From e5486a940bae8147036370468a3d1e85e6651f93 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 22:11:36 +0000 Subject: [PATCH 01/15] passes locally --- .github/workflows/e2e-repl-test.yml | 81 ++++++++++++++++++++++++ .gitignore | 4 ++ tests/e2e/package-lock.json | 96 +++++++++++++++++++++++++++++ tests/e2e/tests/e2e.spec.ts | 12 ++-- 4 files changed, 187 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/e2e-repl-test.yml create mode 100644 tests/e2e/package-lock.json diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml new file mode 100644 index 000000000..daa44d471 --- /dev/null +++ b/.github/workflows/e2e-repl-test.yml @@ -0,0 +1,81 @@ +name: E2E REPL Test + +on: + workflow_dispatch: ~ + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + e2e: + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v4 + + - name: โšก Setup Golang + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Setup Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: '1.91.1' + default: true + profile: minimal + components: rustfmt, clippy + + - name: โšก Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: tavern/internal/www/package-lock.json + + - name: ๐Ÿ“ฆ Install System Dependencies + run: | + sudo apt-get update + sudo apt-get install -y protobuf-compiler libssl-dev + - name: ๐Ÿ“ฆ Build Frontend + working-directory: tavern/internal/www + run: | + npm ci + npm run build + - name: ๐Ÿ”จ Build Tavern + run: | + go mod download + go build -v -o tavern_bin ./tavern + - name: ๐Ÿš€ Run Tavern + env: + HTTP_LISTEN_ADDR: "127.0.0.1:8000" + ENABLE_TEST_DATA: "true" + run: | + ./tavern_bin & + echo "Waiting for Tavern to start..." + # Wait for port 8000 + timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8000 + - name: ๐Ÿ”‘ Get Server Pubkey and Build Agent + working-directory: implants/imixv2 + run: | + echo "Fetching Tavern public key..." + export IMIX_SERVER_PUBKEY=$(curl -s http://127.0.0.1:8000/status | jq -r .Pubkey) + echo "Got pubkey: $IMIX_SERVER_PUBKEY" + echo "Building imixv2..." + cargo build --release + - name: ๐Ÿค– Run Agent + working-directory: implants/imixv2 + env: + IMIX_CALLBACK_URI: "http://127.0.0.1:8000" + run: | + ./target/release/imixv2 & + - name: ๐ŸŽญ Install Playwright + working-directory: tests/e2e + run: | + npm ci + npx playwright install --with-deps chromium + - name: ๐Ÿงช Run E2E Tests + working-directory: tests/e2e + run: npx playwright test diff --git a/.gitignore b/.gitignore index 2357637ca..bad2e4f26 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,10 @@ # Build artifacts dist/** +# Playwright E2E Test Results +tests/e2e/test-results/** +tests/e2e/playwright-report/** + # Binaries for programs and plugins *.exe *.exe~ diff --git a/tests/e2e/package-lock.json b/tests/e2e/package-lock.json new file mode 100644 index 000000000..ef2898f7b --- /dev/null +++ b/tests/e2e/package-lock.json @@ -0,0 +1,96 @@ +{ + "name": "e2e-tests", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "e2e-tests", + "version": "1.0.0", + "devDependencies": { + "@playwright/test": "^1.40.0", + "@types/node": "^18.0.0" + } + }, + "node_modules/@playwright/test": { + "version": "1.57.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.57.0.tgz", + "integrity": "sha512-6TyEnHgd6SArQO8UO2OMTxshln3QMWBtPGrOCgs3wVEmQmwyuNtB10IZMfmYDE0riwNR1cu4q+pPcxMVtaG3TA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright": "1.57.0" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/playwright": { + "version": "1.57.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.57.0.tgz", + "integrity": "sha512-ilYQj1s8sr2ppEJ2YVadYBN0Mb3mdo9J0wQ+UuDhzYqURwSoW4n1Xs5vs7ORwgDGmyEh33tRMeS8KhdkMoLXQw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.57.0" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "fsevents": "2.3.2" + } + }, + "node_modules/playwright-core": { + "version": "1.57.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.57.0.tgz", + "integrity": "sha512-agTcKlMw/mjBWOnD6kFZttAAGHgi/Nw0CZ2o6JqWSbMlI219lAFLZZCyqByTsvVAJq5XA5H8cA6PrvBRpBWEuQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + } + } +} diff --git a/tests/e2e/tests/e2e.spec.ts b/tests/e2e/tests/e2e.spec.ts index 9433e0901..a25afcb67 100644 --- a/tests/e2e/tests/e2e.spec.ts +++ b/tests/e2e/tests/e2e.spec.ts @@ -1,26 +1,26 @@ import { test, expect } from '@playwright/test'; test('End-to-end reverse shell repl test', async ({ page }) => { - // 1. Connect to tavern's UI using playwright at http://127.0.0.1:8000/createQuest + // Connect to tavern's UI using playwright at http://127.0.0.1:8000/createQuest console.log('Navigating to /createQuest'); await page.goto('/createQuest'); - // 2. Select the only visible beacon and click "continue" + // Select the only visible beacon and click "continue" console.log('Waiting for beacons to load'); await expect(page.getByText('Loading beacons...')).toBeHidden({ timeout: 15000 }); // Select the checkbox. Using force: true because Chakra UI hides the actual input. console.log('Selecting beacon'); - await page.locator('input[type="checkbox"]').first().check({ force: true }); + await page.locator('.chakra-card input[type="checkbox"]').first().check({ force: true }); // Click Continue console.log('Clicking Continue (Beacon)'); await page.getByRole('button', { name: 'Continue' }).click(); - // 3. Select the "Reverse Shell Repl" tome and click "continue" + // 3. Select the "Reverse Shell REPL" tome and click "continue" console.log('Selecting Tome'); await expect(page.getByText('Loading tomes...')).toBeHidden(); - await page.getByText('Reverse Shell Repl').click(); + await page.getByText('Reverse Shell REPL').click(); console.log('Clicking Continue (Tome)'); await page.getByRole('button', { name: 'Continue' }).click(); @@ -52,7 +52,7 @@ test('End-to-end reverse shell repl test', async ({ page }) => { await expect(page.locator('#terminal')).toBeVisible({ timeout: 15000 }); // Focus the terminal (clicking it helps ensure focus) - await page.locator('.xterm-cursor-layer').click(); + await page.locator('#terminal').click(); console.log('Sending command'); // Type something. From bd0835419728df133e05795d2b8170032458dc55 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 22:15:44 +0000 Subject: [PATCH 02/15] do not build frontend in e2e test ci --- .github/workflows/e2e-repl-test.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index daa44d471..4c72dae5f 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -39,11 +39,6 @@ jobs: run: | sudo apt-get update sudo apt-get install -y protobuf-compiler libssl-dev - - name: ๐Ÿ“ฆ Build Frontend - working-directory: tavern/internal/www - run: | - npm ci - npm run build - name: ๐Ÿ”จ Build Tavern run: | go mod download From 4badf7b9a5054492520969d23a2775239aaabe0b Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 22:23:36 +0000 Subject: [PATCH 03/15] Fix agent run --- .github/workflows/e2e-repl-test.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 4c72dae5f..0b274ee07 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -52,18 +52,19 @@ jobs: echo "Waiting for Tavern to start..." # Wait for port 8000 timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8000 - - name: ๐Ÿ”‘ Get Server Pubkey and Build Agent + - name: ๐Ÿ”‘ Get Server Pubkey and Run Agent working-directory: implants/imixv2 run: | echo "Fetching Tavern public key..." export IMIX_SERVER_PUBKEY=$(curl -s http://127.0.0.1:8000/status | jq -r .Pubkey) echo "Got pubkey: $IMIX_SERVER_PUBKEY" echo "Building imixv2..." - cargo build --release + cargo run --release - name: ๐Ÿค– Run Agent working-directory: implants/imixv2 env: IMIX_CALLBACK_URI: "http://127.0.0.1:8000" + IMIX_CALLBACK_INTERVAL: 2 run: | ./target/release/imixv2 & - name: ๐ŸŽญ Install Playwright From 3e0963ef4ce01e01495f7a2e4580013994ed137d Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 22:27:15 +0000 Subject: [PATCH 04/15] Fix workflow --- .github/workflows/e2e-repl-test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 0b274ee07..0d34c9e98 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -52,21 +52,17 @@ jobs: echo "Waiting for Tavern to start..." # Wait for port 8000 timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8000 - - name: ๐Ÿ”‘ Get Server Pubkey and Run Agent - working-directory: implants/imixv2 - run: | - echo "Fetching Tavern public key..." - export IMIX_SERVER_PUBKEY=$(curl -s http://127.0.0.1:8000/status | jq -r .Pubkey) - echo "Got pubkey: $IMIX_SERVER_PUBKEY" - echo "Building imixv2..." - cargo run --release - name: ๐Ÿค– Run Agent working-directory: implants/imixv2 env: IMIX_CALLBACK_URI: "http://127.0.0.1:8000" IMIX_CALLBACK_INTERVAL: 2 run: | - ./target/release/imixv2 & + echo "Fetching Tavern public key..." + export IMIX_SERVER_PUBKEY=$(curl -s http://127.0.0.1:8000/status | jq -r .Pubkey) + echo "Got pubkey: $IMIX_SERVER_PUBKEY" + echo "Building imixv2..." + cargo run --release & - name: ๐ŸŽญ Install Playwright working-directory: tests/e2e run: | From a547c405fa21b13de5b3c4393fdf6304863dcb93 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 22:47:00 +0000 Subject: [PATCH 05/15] fix workflow --- .github/workflows/e2e-repl-test.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 0d34c9e98..7cdfe8863 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -52,7 +52,12 @@ jobs: echo "Waiting for Tavern to start..." # Wait for port 8000 timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8000 - - name: ๐Ÿค– Run Agent + - name: ๐ŸŽญ Install Playwright + working-directory: tests/e2e + run: | + npm ci + npx playwright install --with-deps chromium + - name: ๐Ÿค– Run E2E Tests working-directory: implants/imixv2 env: IMIX_CALLBACK_URI: "http://127.0.0.1:8000" @@ -63,11 +68,4 @@ jobs: echo "Got pubkey: $IMIX_SERVER_PUBKEY" echo "Building imixv2..." cargo run --release & - - name: ๐ŸŽญ Install Playwright - working-directory: tests/e2e - run: | - npm ci - npx playwright install --with-deps chromium - - name: ๐Ÿงช Run E2E Tests - working-directory: tests/e2e - run: npx playwright test + npx playwright test From eff4387f3607dde2cb23f1b234afd0e000708586 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 22:59:08 +0000 Subject: [PATCH 06/15] another try --- .github/workflows/e2e-repl-test.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 7cdfe8863..e8ccb6dbf 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -52,12 +52,7 @@ jobs: echo "Waiting for Tavern to start..." # Wait for port 8000 timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8000 - - name: ๐ŸŽญ Install Playwright - working-directory: tests/e2e - run: | - npm ci - npx playwright install --with-deps chromium - - name: ๐Ÿค– Run E2E Tests + - name: ๐Ÿค– Run Agent working-directory: implants/imixv2 env: IMIX_CALLBACK_URI: "http://127.0.0.1:8000" @@ -67,5 +62,14 @@ jobs: export IMIX_SERVER_PUBKEY=$(curl -s http://127.0.0.1:8000/status | jq -r .Pubkey) echo "Got pubkey: $IMIX_SERVER_PUBKEY" echo "Building imixv2..." - cargo run --release & + cargo build --release --bin imixv2 --target-dir ./build + ./build/release/imixv2 & + - name: ๐ŸŽญ Install Playwright + working-directory: tests/e2e + run: | + npm ci + npx playwright install --with-deps chromium + - name: ๐Ÿค– Run E2E Tests + working-directory: tests/e2e + run: | npx playwright test From ad0a913db505124899a8f5c20dc9791ee420eb1f Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 23:10:28 +0000 Subject: [PATCH 07/15] fix workflow --- .github/workflows/e2e-repl-test.yml | 35 ++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index e8ccb6dbf..7c35215f5 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -45,31 +45,50 @@ jobs: go build -v -o tavern_bin ./tavern - name: ๐Ÿš€ Run Tavern env: - HTTP_LISTEN_ADDR: "127.0.0.1:8000" + HTTP_LISTEN_ADDR: ":8000" ENABLE_TEST_DATA: "true" run: | ./tavern_bin & echo "Waiting for Tavern to start..." # Wait for port 8000 - timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' 127.0.0.1 8000 + timeout 30 sh -c 'until nc -z $0 $1; do sleep 1; done' localhost 8000 - name: ๐Ÿค– Run Agent working-directory: implants/imixv2 env: - IMIX_CALLBACK_URI: "http://127.0.0.1:8000" - IMIX_CALLBACK_INTERVAL: 2 + IMIX_CALLBACK_URI: "http://localhost:8000" + IMIX_CALLBACK_INTERVAL: 1 run: | - echo "Fetching Tavern public key..." - export IMIX_SERVER_PUBKEY=$(curl -s http://127.0.0.1:8000/status | jq -r .Pubkey) + # Fetch the pubkey and verify it's not empty + PUBKEY=$(curl -s http://localhost:8000/status | jq -r .Pubkey) + if [ -z "$PUBKEY" ] || [ "$PUBKEY" == "null" ]; then + echo "Error: Could not fetch Pubkey from Tavern" + exit 1 + fi + export IMIX_SERVER_PUBKEY=$PUBKEY echo "Got pubkey: $IMIX_SERVER_PUBKEY" + echo "Building imixv2..." cargo build --release --bin imixv2 --target-dir ./build - ./build/release/imixv2 & + # Run agent and pipe logs to a file + ./build/release/imixv2 > agent.log 2>&1 & + + # Give the agent a moment to perform the initial handshake + echo "Agent started. Waiting for initial callback..." + sleep 5 - name: ๐ŸŽญ Install Playwright working-directory: tests/e2e run: | npm ci npx playwright install --with-deps chromium - - name: ๐Ÿค– Run E2E Tests + - name: ๐Ÿงช Run E2E Tests working-directory: tests/e2e run: | npx playwright test + - name: ๐Ÿ“‚ Upload Service Logs + if: always() # Runs even if tests fail + uses: actions/upload-artifact@v4 + with: + name: e2e-logs + path: | + tavern.log + implants/imixv2/agent.log From 8d4705b1b88bf4778f812edaf671807faac9bd77 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 23:17:57 +0000 Subject: [PATCH 08/15] debug --- .github/workflows/e2e-repl-test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 7c35215f5..bcea28dda 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -68,9 +68,9 @@ jobs: echo "Got pubkey: $IMIX_SERVER_PUBKEY" echo "Building imixv2..." - cargo build --release --bin imixv2 --target-dir ./build + cargo build --bin imixv2 --target-dir ./build # Run agent and pipe logs to a file - ./build/release/imixv2 > agent.log 2>&1 & + ./build/debug/imixv2 > agent.log 2>&1 & # Give the agent a moment to perform the initial handshake echo "Agent started. Waiting for initial callback..." @@ -80,6 +80,12 @@ jobs: run: | npm ci npx playwright install --with-deps chromium + - name: Debug + run: | + echo "Tavern Status:" + curl -s http://localhost:8000/status | jq . + echo "Agent Log Tail:" + tail -n 20 implants/imixv2/agent.log - name: ๐Ÿงช Run E2E Tests working-directory: tests/e2e run: | From a890703ba5b1e7d94d3c3bec041bc2e1b3273ddb Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 23:47:47 +0000 Subject: [PATCH 09/15] debug --- .github/workflows/e2e-repl-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index bcea28dda..24dca25dc 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -86,6 +86,7 @@ jobs: curl -s http://localhost:8000/status | jq . echo "Agent Log Tail:" tail -n 20 implants/imixv2/agent.log + curl -X POST -H "Content-Type: application/json" -d '{"query": "query { beacons { edges { node { id createdAt lastSeenAt shells { edges { node { id } } } tasks { edges { node { createdAt execStartedAt execFinishedAt quest { tome { name } } } } } } } } }"}' http://localhost:8000/query | jq - name: ๐Ÿงช Run E2E Tests working-directory: tests/e2e run: | From 5a9321f312222c8800f2ac125b5b24c5f7b8c800 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 23:48:03 +0000 Subject: [PATCH 10/15] fix debug --- .github/workflows/e2e-repl-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 24dca25dc..7fd1db849 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -86,7 +86,7 @@ jobs: curl -s http://localhost:8000/status | jq . echo "Agent Log Tail:" tail -n 20 implants/imixv2/agent.log - curl -X POST -H "Content-Type: application/json" -d '{"query": "query { beacons { edges { node { id createdAt lastSeenAt shells { edges { node { id } } } tasks { edges { node { createdAt execStartedAt execFinishedAt quest { tome { name } } } } } } } } }"}' http://localhost:8000/query | jq + curl -X POST -H "Content-Type: application/json" -d '{"query": "query { beacons { edges { node { id createdAt lastSeenAt shells { edges { node { id } } } tasks { edges { node { createdAt execStartedAt execFinishedAt quest { tome { name } } } } } } } } }"}' http://localhost:8000/graphql | jq - name: ๐Ÿงช Run E2E Tests working-directory: tests/e2e run: | From 23d8fdfd27e01027740a9520233756f247ce5fb9 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Thu, 25 Dec 2025 23:59:10 +0000 Subject: [PATCH 11/15] remove test data flag....... >:( --- .github/workflows/e2e-repl-test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 7fd1db849..45604f4ec 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -8,7 +8,7 @@ on: branches: [ main ] jobs: - e2e: + repl_e2e: runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -46,7 +46,6 @@ jobs: - name: ๐Ÿš€ Run Tavern env: HTTP_LISTEN_ADDR: ":8000" - ENABLE_TEST_DATA: "true" run: | ./tavern_bin & echo "Waiting for Tavern to start..." From 4524eb1cbb4e8979b3d7aecc7fb0da9df1e2053c Mon Sep 17 00:00:00 2001 From: KCarretto Date: Fri, 26 Dec 2025 00:04:31 +0000 Subject: [PATCH 12/15] rename --- .github/workflows/e2e-repl-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 45604f4ec..0de74bcd2 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -1,4 +1,4 @@ -name: E2E REPL Test +name: E2E REPL Test ๐Ÿงช on: workflow_dispatch: ~ @@ -8,7 +8,7 @@ on: branches: [ main ] jobs: - repl_e2e: + E2E REPL Test: runs-on: ubuntu-latest timeout-minutes: 30 steps: From 42fc22570ec9cdca75e7cf225f93dba98b1d96d9 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Fri, 26 Dec 2025 00:07:52 +0000 Subject: [PATCH 13/15] fix versions --- .github/workflows/e2e-repl-test.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index 0de74bcd2..b2a1cf382 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -12,10 +12,9 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v4 - + - uses: actions/checkout@v5 - name: โšก Setup Golang - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version-file: go.mod cache: true @@ -79,13 +78,6 @@ jobs: run: | npm ci npx playwright install --with-deps chromium - - name: Debug - run: | - echo "Tavern Status:" - curl -s http://localhost:8000/status | jq . - echo "Agent Log Tail:" - tail -n 20 implants/imixv2/agent.log - curl -X POST -H "Content-Type: application/json" -d '{"query": "query { beacons { edges { node { id createdAt lastSeenAt shells { edges { node { id } } } tasks { edges { node { createdAt execStartedAt execFinishedAt quest { tome { name } } } } } } } } }"}' http://localhost:8000/graphql | jq - name: ๐Ÿงช Run E2E Tests working-directory: tests/e2e run: | From 5fd70f3cece7c82dc09d07ca88d93dd5b325a897 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Fri, 26 Dec 2025 00:13:02 +0000 Subject: [PATCH 14/15] make a better assert --- tests/e2e/tests/e2e.spec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/e2e/tests/e2e.spec.ts b/tests/e2e/tests/e2e.spec.ts index a25afcb67..bfa6e6d9a 100644 --- a/tests/e2e/tests/e2e.spec.ts +++ b/tests/e2e/tests/e2e.spec.ts @@ -10,8 +10,15 @@ test('End-to-end reverse shell repl test', async ({ page }) => { await expect(page.getByText('Loading beacons...')).toBeHidden({ timeout: 15000 }); // Select the checkbox. Using force: true because Chakra UI hides the actual input. + // Define the locator for the beacon checkboxes + const beacons = page.locator('.chakra-card input[type="checkbox"]'); + + // Assert that exactly one beacon exists + await expect(beacons).toHaveCount(1); + + // Select the beacon console.log('Selecting beacon'); - await page.locator('.chakra-card input[type="checkbox"]').first().check({ force: true }); + await beacons.first().check({ force: true }); // Click Continue console.log('Clicking Continue (Beacon)'); From 43c2b64deb30f0ee6f6a3a6cdda4a9ce191feaa2 Mon Sep 17 00:00:00 2001 From: KCarretto Date: Fri, 26 Dec 2025 00:17:24 +0000 Subject: [PATCH 15/15] rename --- .github/workflows/e2e-repl-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e-repl-test.yml b/.github/workflows/e2e-repl-test.yml index b2a1cf382..669e105de 100644 --- a/.github/workflows/e2e-repl-test.yml +++ b/.github/workflows/e2e-repl-test.yml @@ -8,7 +8,7 @@ on: branches: [ main ] jobs: - E2E REPL Test: + e2e_repl_test: runs-on: ubuntu-latest timeout-minutes: 30 steps: