Skip to content

Commit 8dbe11a

Browse files
CopilotMossaka
andcommitted
feat: add host access integration tests for AWF + MCP Gateway
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
1 parent 1f1bf70 commit 8dbe11a

3 files changed

Lines changed: 132 additions & 239 deletions

File tree

.github/workflows/test-integration.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ jobs:
219219
retention-days: 7
220220

221221
test-mcpg-integration:
222-
name: MCPG Integration Tests
222+
name: Host Access Integration Tests
223223
runs-on: ubuntu-latest
224224
timeout-minutes: 15
225225

@@ -242,10 +242,7 @@ jobs:
242242
- name: Pre-test cleanup
243243
run: sudo ./scripts/ci/cleanup.sh
244244

245-
- name: Pull MCP Gateway image
246-
run: docker pull ghcr.io/githubnext/gh-aw-mcpg:v0.0.10
247-
248-
- name: Run MCPG integration tests
245+
- name: Run host access integration tests
249246
id: run-tests
250247
env:
251248
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -262,23 +259,21 @@ jobs:
262259
- name: Generate test summary
263260
if: always()
264261
run: |
265-
npx tsx scripts/ci/generate-test-summary.ts "mcpg-integration.test.ts" "MCPG Integration Tests" test-output.log
262+
npx tsx scripts/ci/generate-test-summary.ts "mcpg-integration.test.ts" "Host Access Integration Tests" test-output.log
266263
267264
- name: Check test results
268265
if: steps.run-tests.outcome == 'failure'
269266
run: exit 1
270267

271268
- name: Post-test cleanup
272269
if: always()
273-
run: |
274-
docker rm -f mcpg-gateway-test 2>/dev/null || true
275-
sudo ./scripts/ci/cleanup.sh
270+
run: sudo ./scripts/ci/cleanup.sh
276271

277272
- name: Upload test logs on failure
278273
if: failure()
279274
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
280275
with:
281-
name: mcpg-integration-test-logs
276+
name: host-access-integration-test-logs
282277
path: |
283278
/tmp/*-test.log
284279
/tmp/awf-*/

tests/fixtures/awf-runner.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ export class AwfRunner {
9898
args.push('--enable-host-access');
9999
}
100100

101+
// Add environment variables to pass to container
102+
if (options.env) {
103+
for (const [key, value] of Object.entries(options.env)) {
104+
args.push('--env', `${key}=${value}`);
105+
}
106+
}
107+
101108
// Add -- separator before command
102109
args.push('--');
103110

@@ -222,6 +229,13 @@ export class AwfRunner {
222229
args.push('--enable-host-access');
223230
}
224231

232+
// Add environment variables to pass to container
233+
if (options.env) {
234+
for (const [key, value] of Object.entries(options.env)) {
235+
args.push('--env', `${key}=${value}`);
236+
}
237+
}
238+
225239
// Add -- separator before command
226240
args.push('--');
227241

0 commit comments

Comments
 (0)