Skip to content

Commit 4051eaa

Browse files
committed
add a test for warnning on ambient caps setting error
Signed-off-by: lfbzhm <[email protected]>
1 parent 063bd24 commit 4051eaa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integration/capabilities.bats

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,11 @@ function teardown() {
136136
[[ "${output}" == *"CapBnd: 0000000400000021"* ]]
137137
[[ "${output}" == *"CapAmb: 0000000000000000"* ]]
138138
}
139+
140+
@test "runc run [ambient caps not set in inheritable result in a warning]" {
141+
update_config ' .process.capabilities.inheritable = ["CAP_KILL"]
142+
| .process.capabilities.ambient = ["CAP_KILL", "CAP_AUDIT_WRITE"]'
143+
runc run test_amb
144+
[ "$status" -eq 0 ]
145+
[[ "$output" == **"unable to set Ambient capabilities:"* ]]
146+
}

0 commit comments

Comments
 (0)