Selaa lähdekoodia

Plan 17 M5: bake the integration env fixes into test defaults

The e2e default port is 8180 (8080 is production), the README's host
run drops the SADDLE_CALLBACK_BASE_URL export in favour of the mounted
web-config.json saddle_callback_base_url key (config beats env), and
the demo-repo main-branch preparation is stated where the harness
prepares it.
clanker 1 kuukausi sitten
vanhempi
sitoutus
edf9ec9658
2 muutettua tiedostoa jossa 12 lisäystä ja 5 poistoa
  1. 9 3
      README.md
  2. 3 2
      test/integration_test.py

+ 9 - 3
README.md

@@ -398,20 +398,26 @@ must be FRESH — the harness refuses a used one):
 export SPRY_SEED_ADMIN_USERNAME=admin SPRY_SEED_ADMIN_PASSWORD=adminpass123
 export SADDLE_LLM_BASE_URL=http://127.0.0.1:9999 SADDLE_LLM_MODEL=mock
 export SADDLE_PROJECTS_ROOT=/tmp/clanker-e2e/workspace
-export SADDLE_CALLBACK_BASE_URL=http://localhost:8080
 export SPRY_DB_PATH=/tmp/clanker-e2e/web/clanker-saddle.sqlite
 export SADDLE_GOAL_RESUME_S=2   # shrink the coalescing window for tests
-./builddir/clanker-saddle 8080 &
+./builddir/clanker-saddle 8180 &   # 8180 — 8080 is the production port
 
 SADDLE_WORKSPACE_ROOT=/tmp/clanker-e2e/workspace \
     ../saddle/builddir/src/saddle --port 7100 &
 
-WEB=http://localhost:8080 SADDLE=http://localhost:7100 \
+WEB=http://localhost:8180 SADDLE=http://localhost:7100 \
 WORKSPACE=/tmp/clanker-e2e/workspace \
 DB_PATH=/tmp/clanker-e2e/web/clanker-saddle.sqlite \
     python3 test/integration_test.py
 ```
 
+The e2e callback base URL comes from the mounted `web-config.json`'s
+`saddle_callback_base_url` key (`http://localhost:8180` for a host run)
+— the config beats the `SADDLE_CALLBACK_BASE_URL` environment
+variable, so set it there rather than exporting a second source of
+truth. The harness-prepared `demo` repo and its bare origin both live
+on branch `main` (the project registration's default branch matches).
+
 The daemon's `SADDLE_WORKSPACE_ROOT` and the app's
 `SADDLE_PROJECTS_ROOT` point at the SAME directory (the goal clone the
 daemon cuts must anchor the worker worktrees — the shared-volume

+ 3 - 2
test/integration_test.py

@@ -55,7 +55,8 @@ pushable (the harness prepares demo + demo-origin.git when WORKSPACE
 is empty).
 
 Environment:
-  WEB            web app base URL      (default http://localhost:8080)
+  WEB            web app base URL      (default http://localhost:8180 —
+                 8080 is the production port, never the e2e default)
   SADDLE         daemon control URL    (default http://localhost:7100)
   SADDLE_HOST    host:port to register (default localhost:7100)
   SADDLE_NAME    registration name     (default saddle-e2e-1)
@@ -82,7 +83,7 @@ import urllib.parse
 import urllib.request
 
 REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-WEB = os.environ.get("WEB", "http://localhost:8080")
+WEB = os.environ.get("WEB", "http://localhost:8180")
 SADDLE = os.environ.get("SADDLE", "http://localhost:7100")
 SADDLE_HOST = os.environ.get("SADDLE_HOST", "localhost:7100")
 SADDLE_NAME = os.environ.get("SADDLE_NAME", "saddle-e2e-1")