-
Notifications
You must be signed in to change notification settings - Fork 215
[WIP] Fix emission of --enable-chroot for awf call #15247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,9 +33,9 @@ func TestFirewallArgsInCopilotEngine(t *testing.T) { | |||||||||||||
|
|
||||||||||||||
| stepContent := strings.Join(steps[0], "\n") | ||||||||||||||
|
|
||||||||||||||
| // Check that the command contains --enable-chroot for AWF v0.13.1+ chroot mode | ||||||||||||||
| if !strings.Contains(stepContent, "awf --enable-chroot") { | ||||||||||||||
| t.Error("Expected command to contain 'awf --enable-chroot'") | ||||||||||||||
| // Check that the command contains awf (AWF v0.15.0+ uses chroot mode by default) | ||||||||||||||
| if !strings.Contains(stepContent, "sudo -E awf") { | ||||||||||||||
| t.Error("Expected command to contain 'sudo -E awf'") | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| if !strings.Contains(stepContent, "--allow-domains") { | ||||||||||||||
|
|
@@ -150,15 +150,15 @@ func TestFirewallArgsInCopilotEngine(t *testing.T) { | |||||||||||||
|
|
||||||||||||||
| stepContent := strings.Join(steps[0], "\n") | ||||||||||||||
|
|
||||||||||||||
| // Check that --enable-chroot is used for transparent host access (AWF v0.13.1+) | ||||||||||||||
| // This replaces the need for explicit binary mounts like --mount /usr/bin/gh:/usr/bin/gh:ro | ||||||||||||||
| if !strings.Contains(stepContent, "--enable-chroot") { | ||||||||||||||
| t.Error("Expected AWF command to contain '--enable-chroot' for transparent host access") | ||||||||||||||
| // Check that AWF is used for transparent host access (AWF v0.15.0+) | ||||||||||||||
| // Chroot mode is now the default, so no --enable-chroot flag is needed | ||||||||||||||
| if !strings.Contains(stepContent, "sudo -E awf") { | ||||||||||||||
| t.Error("Expected AWF command for transparent host access") | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
|
||||||||||||||
| // Ensure we are not explicitly passing the chroot flag (chroot is the default) | |
| if strings.Contains(stepContent, "--enable-chroot") { | |
| t.Error("AWF command should not include '--enable-chroot' flag when chroot mode is the default") | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s still a comment later in this file that references
--enable-chroot(around line ~357). Since this PR removes that flag for AWF v0.15.0+, please update that remaining comment to avoid misleading guidance (e.g., describe chroot mode as default and remove mention of--enable-chroot).