Skip to content

Commit a0bc330

Browse files
authored
Merge pull request #79 from r33drichards/claude/docker-integration-tests-byGxH
Replace Rust E2E tests with Docker Compose integration tests
2 parents d7acc28 + 193e8ad commit a0bc330

4 files changed

Lines changed: 308 additions & 530 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Module Policy Integration Test
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- Dockerfile
7+
- docker-compose.module-policy.yml
8+
- policies/**
9+
- tests/module-policy-integration.sh
10+
- server/src/**
11+
12+
jobs:
13+
integration-test:
14+
name: Module Policy Integration
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Run module policy integration tests
23+
run: ./tests/module-policy-integration.sh

docker-compose.module-policy.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Docker Compose for module policy integration tests.
2+
#
3+
# Services:
4+
# opa – OPA server loaded with policies/
5+
# mcp-default – mcp-js with external modules DISABLED (default)
6+
# mcp-opa-policy – mcp-js with --allow-external-modules + --opa-module-policy
7+
8+
services:
9+
opa:
10+
image: openpolicyagent/opa:latest
11+
command: ["run", "--server", "--addr", "0.0.0.0:8181", "/policies"]
12+
ports:
13+
- "8181:8181"
14+
volumes:
15+
- ./policies:/policies:ro
16+
17+
mcp-default:
18+
build: .
19+
command:
20+
- --http-port=3000
21+
- --directory-path=/data/heaps
22+
- --session-db-path=/data/sessions
23+
tmpfs:
24+
- /data:uid=1000,gid=1000
25+
ports:
26+
- "3001:3000"
27+
28+
mcp-opa-policy:
29+
build: .
30+
command:
31+
- --http-port=3000
32+
- --directory-path=/data/heaps
33+
- --session-db-path=/data/sessions
34+
- --allow-external-modules
35+
- --opa-url=http://opa:8181
36+
- --opa-module-policy=mcp/modules
37+
tmpfs:
38+
- /data:uid=1000,gid=1000
39+
ports:
40+
- "3002:3000"
41+
depends_on:
42+
- opa

0 commit comments

Comments
 (0)