Skip to content

Commit 0a4e77a

Browse files
committed
QA: rpc_users: Extend rpccookieperms test to octal values
1 parent a888155 commit 0a4e77a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/functional/rpc_users.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,14 @@ def test_auth(self, node, user, password):
8888
assert_equal(401, call_with_auth(node, user + 'wrong', password + 'wrong').status)
8989

9090
def test_rpccookieperms(self):
91-
p = {"owner": 0o600, "group": 0o640, "all": 0o644}
91+
p = {
92+
"owner": 0o600,
93+
"group": 0o640,
94+
"all": 0o644,
95+
"440": 0o440,
96+
"640": 0o640,
97+
"444": 0o444,
98+
}
9299

93100
if platform.system() == 'Windows':
94101
self.log.info(f"Skip cookie file permissions checks as OS detected as: {platform.system()=}")
@@ -118,7 +125,7 @@ def test_perm(perm: Optional[str]):
118125
test_perm(None)
119126

120127
self.log.info('Check custom cookie permissions')
121-
for perm in ["owner", "group", "all"]:
128+
for perm in p.keys():
122129
test_perm(perm)
123130

124131
def test_norpccookiefile(self, node0_cookie_path):

0 commit comments

Comments
 (0)