diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 18:21:54 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 18:21:54 -0800 |
| commit | f9b22750dced97a974005593909077d09b1129b9 (patch) | |
| tree | 63e0630ec23cab5f7b25d61ff5751d6e4d6230f0 /scripts/run_e2e_safe.sh | |
| parent | 1413eca1f1dfea2fe125a5dc9bde293058cc3e03 (diff) | |
| download | neko-f9b22750dced97a974005593909077d09b1129b9.tar.gz neko-f9b22750dced97a974005593909077d09b1129b9.tar.bz2 neko-f9b22750dced97a974005593909077d09b1129b9.zip | |
test: mock RSS feeds in E2E tests
Diffstat (limited to 'scripts/run_e2e_safe.sh')
| -rwxr-xr-x | scripts/run_e2e_safe.sh | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/scripts/run_e2e_safe.sh b/scripts/run_e2e_safe.sh index a68e7be..a24455c 100755 --- a/scripts/run_e2e_safe.sh +++ b/scripts/run_e2e_safe.sh @@ -10,8 +10,22 @@ go build -o neko_server ./cmd/neko echo "Creating data directory..." mkdir -p .data +echo "Starting mock feed server on port 9090..." +python3 -m http.server 9090 --directory scripts > mock_server.log 2>&1 & +MOCK_PID=$! +echo "Mock Server PID: $MOCK_PID" + +# Verify mock server +sleep 2 +if ! curl -s --head http://localhost:9090/mock_feed.xml > /dev/null; then + echo "Mock server failed to start!" + cat mock_server.log + exit 1 +fi +echo "Mock server is up." + echo "Starting backend on port 4994..." -./neko_server --http=4994 --database=.data/test.db > backend.log 2>&1 & +./neko_server --verbose --allow-local --http=4994 --database=.data/test.db > backend.log 2>&1 & SERVER_PID=$! echo "Backend PID: $SERVER_PID" @@ -41,12 +55,15 @@ if npm run test:e2e; then EXIT_CODE=0 else echo "Tests failed!" + echo "Backend Logs:" + cat ../backend.log EXIT_CODE=1 fi cd .. echo "Cleaning up..." kill $SERVER_PID || true +kill $MOCK_PID || true scripts/clean_test_env.sh exit $EXIT_CODE |
