Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 9423829

Browse files
georgyturevichpiontec
authored andcommitted
Fix tests where rules where still with capitalized keys
1 parent 2ff3802 commit 9423829

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ class ApiContainerTest(unittest.TestCase):
2020
test_trigger = {"name": "set local flag", "trigger": lambda v: ApiContainerTest.set_trigger_flag()}
2121
forbid_privileged_rule = {
2222
"name": "can't use privileged or cap-add without being on the whitelist",
23-
"rule": lambda c: c.params["hostconfig"]["privileged"] or c.params["hostConfig"]["capadd"] is not None
23+
"rule": lambda c: c.params["hostconfig"]["privileged"] or c.params["hostconfig"]["capadd"] is not None
2424
}
2525
forbid_privileged_with_check_hostconfig_rule = {
2626
"name": "can't use privileged without being on the whitelist",
27-
"rule": lambda c: "Privileged" in c.params["HostConfig"]
28-
and c.params["HostConfig"]["Privileged"] is not None
27+
"rule": lambda c: "privileged" in c.params["hostconfig"]
28+
and c.params["hostconfig"]["privileged"] is not None
2929
}
3030

3131
@staticmethod

0 commit comments

Comments
 (0)