aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-17 20:43:08 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-17 20:43:08 -0800
commit232b63ba9cf1c7e5126839f7e1df034e375114d6 (patch)
tree6b8c26abb5343348a12bcff40ec85dcb960a606c
parentd7c1cc00abe7c8097625ee905a1285aa0794a598 (diff)
downloadneko-232b63ba9cf1c7e5126839f7e1df034e375114d6.tar.gz
neko-232b63ba9cf1c7e5126839f7e1df034e375114d6.tar.bz2
neko-232b63ba9cf1c7e5126839f7e1df034e375114d6.zip
Prune dead E2E testing scripts and targets
-rw-r--r--Makefile5
-rw-r--r--README.md7
-rwxr-xr-xscripts/clean_test_env.sh21
-rwxr-xr-xscripts/run_e2e.sh47
-rwxr-xr-xscripts/run_e2e_safe.sh69
5 files changed, 2 insertions, 147 deletions
diff --git a/Makefile b/Makefile
index ed03063..246d4ae 100644
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,7 @@ VERSION=0.3
BUILD=`git rev-parse HEAD`
LDFLAGS=-ldflags "-X main.Version=${VERSION} -X main.Build=${BUILD}"
-.PHONY: default all clean build install test test-race test-frontend test-e2e ui-check lint check ci run dev docs install-hooks cover coverage-html bench bench-short stress test-perf
+.PHONY: default all clean build install test test-race test-frontend ui-check lint check ci run dev docs install-hooks cover coverage-html bench bench-short stress test-perf
default: build
@@ -50,9 +50,6 @@ coverage-html: cover
test-frontend:
cd frontend-vanilla && ${NPM} test -- --run
-# test-e2e: build
-# ./scripts/run_e2e_safe.sh
-
ui-check: ui-vanilla
git diff --exit-code web/dist/v3/
diff --git a/README.md b/README.md
index 7254923..6b36a05 100644
--- a/README.md
+++ b/README.md
@@ -307,11 +307,6 @@ The project underwent a significant modernization phase with the help of Google
# Development and Testing
-Utility scripts and test wrappers are located in the `scripts/` directory:
-- `scripts/clean_test_env.sh`: Resets the test database and kills stray processes.
-- `scripts/run_e2e_safe.sh`: A safe wrapper for running Playwright E2E tests.
-- `scripts/run_e2e.sh`: Standard E2E test runner.
-
## Development with Containers
If you don't have Go or Node installed locally, or prefer an isolated environment, you can use the provided `docker-compose.dev.yaml`.
@@ -323,7 +318,7 @@ If you don't have Go or Node installed locally, or prefer an isolated environmen
2. **Run tests inside the container**:
```bash
- docker compose -f docker-compose.dev.yaml exec neko-dev bash -c "go test ./... && cd frontend && npm install && npm test"
+ docker compose -f docker-compose.dev.yaml exec neko-dev bash -c "go test ./... && cd frontend-vanilla && npm install && npm test"
```
3. **Get an interactive shell**:
diff --git a/scripts/clean_test_env.sh b/scripts/clean_test_env.sh
deleted file mode 100755
index f6b6867..0000000
--- a/scripts/clean_test_env.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-echo "Cleaning up test environment..."
-
-# Kill neko backend binary if running
-pkill -x "neko" || true
-pkill -x "neko_server" || true
-
-# Kill specific node processes related to vite/playwright
-# We avoid pkill -f node to not kill the agent connection
-pkill -f "vite" || true
-pkill -f "playwright" || true
-
-# Kill anything on ports 4994 and 5173 and 9090
-fuser -k 4994/tcp || true
-fuser -k 5173/tcp || true
-fuser -k 9090/tcp || true
-
-# Remove test databases
-rm -f neko_test.db .data/test.db
-
-echo "Cleanup complete."
diff --git a/scripts/run_e2e.sh b/scripts/run_e2e.sh
deleted file mode 100755
index 12d5f90..0000000
--- a/scripts/run_e2e.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-set -e
-
-# Cleanup function to kill the neko process and remove the test db
-cleanup() {
- echo "Cleaning up..."
- if [ -n "$NEKO_PID" ]; then
- kill $NEKO_PID 2>/dev/null || true
- fi
- rm -f neko_test.db
-}
-
-# Register cleanup to run on exit
-trap cleanup EXIT
-
-echo "Building neko..."
-go build -o neko ./cmd/neko
-
-echo "Starting neko backend on port 4994..."
-./neko -d neko_test.db -s 4994 > /dev/null 2>&1 &
-NEKO_PID=$!
-
-echo "Waiting for backend to start..."
-# simple wait loop
-for i in {1..10}; do
- if nc -z localhost 4994; then
- echo "Backend is up!"
- break
- fi
- sleep 1
-done
-
-echo "Running Playwright tests..."
-cd frontend
-# Ensure we use the correct credentials/config if needed by the tests
-# The tests currently hardcode /v2/login but don't seem to have the password hardcoded in the fill step yet?
-# Looking at e2e.spec.ts: await page.fill('#password', ''); - it fills empty string?
-# usage of 'secret' matches nothing in the test.
-# Let's check e2e.spec.ts again to match expectations exactly.
-# In e2e.spec.ts: await page.fill('#password', '');
-# It implies it expects no password or ignores it?
-# Or maybe the previous test run failed because of this too.
-# I will set a simple password 'secret' and we might need to update the test to use it.
-# Actually, let's look at the test content again.
-
-npm run test:e2e
-cd ..
diff --git a/scripts/run_e2e_safe.sh b/scripts/run_e2e_safe.sh
deleted file mode 100755
index a24455c..0000000
--- a/scripts/run_e2e_safe.sh
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/bin/bash
-set -e
-
-# Cleanup first
-scripts/clean_test_env.sh
-
-echo "Building backend..."
-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 --verbose --allow-local --http=4994 --database=.data/test.db > backend.log 2>&1 &
-SERVER_PID=$!
-
-echo "Backend PID: $SERVER_PID"
-
-# Wait for server to be ready
-echo "Waiting for backend to start..."
-for i in {1..30}; do
- if nc -z localhost 4994; then
- echo "Backend is up!"
- break
- fi
- echo "Waiting..."
- sleep 1
-done
-
-if ! nc -z localhost 4994; then
- echo "Backend failed to start. Check backend.log"
- cat backend.log
- kill $SERVER_PID || true
- exit 1
-fi
-
-echo "Running E2E tests..."
-cd frontend
-if npm run test:e2e; then
- echo "Tests passed!"
- 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