Skip to content

Commit 282f31b

Browse files
committed
Configure sanboxing in e2e tests
Also, run cancellation test outside sandbox to avoid problems with resolving PID
1 parent 0aa879b commit 282f31b

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ jobs:
1717
- uses: actions/setup-node@v6
1818
with:
1919
node-version: '24'
20+
- name: Condfigure sandboxing
21+
run: |
22+
sudo apt-get update
23+
sudo apt-get install --yes bubblewrap
24+
sudo sysctl -w kernel.unprivileged_userns_clone=1
25+
if [ -f /proc/sys/kernel/apparmor_restrict_unprivileged_userns ]; then
26+
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
27+
fi
2028
- name: Install dependencies
2129
run: npm ci
2230
- name: Run e2e tests

src/__tests__/CodexACPAgent/e2e/acp-e2e-shell-approval.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,7 @@ describeE2E("E2E shell cancellation tests", () => {
135135
}
136136

137137
it("cancels a running shell command", async () => {
138-
fixture = await createAuthenticatedFixture();
139-
fixture.setPermissionResponder(createPermissionResponder("execute", ApprovalOptionId.AllowOnce));
140-
138+
fixture = await createAuthenticatedFixture(AgentMode.AgentFullAccess);
141139
const sessionId = (await fixture.createSession()).sessionId;
142140
const pidFilePath = path.join(fixture.workspaceDir, "cancel-command.pid");
143141
const command = `/bin/sh -c 'echo $$ > "${pidFilePath}"; exec sleep 100'`;

0 commit comments

Comments
 (0)