Tests: assertion related fixes.

This commit is contained in:
Andrei Zeliankou
2023-05-25 16:56:14 +01:00
parent 0132e552d0
commit b034bf6703
11 changed files with 90 additions and 95 deletions

View File

@@ -289,10 +289,10 @@ class TestGoIsolation(TestApplicationGo):
obj = self.getjson(url='/?file=/go/app')['body']
assert obj['FileExists'] == True, 'app relative to rootfs'
assert obj['FileExists'], 'app relative to rootfs'
obj = self.getjson(url='/?file=/bin/sh')['body']
assert obj['FileExists'] == False, 'file should not exists'
assert not obj['FileExists'], 'file should not exists'
def test_go_isolation_rootfs_container_priv(self, is_su, temp_dir):
if not is_su:
@@ -310,10 +310,10 @@ class TestGoIsolation(TestApplicationGo):
obj = self.getjson(url='/?file=/go/app')['body']
assert obj['FileExists'] == True, 'app relative to rootfs'
assert obj['FileExists'], 'app relative to rootfs'
obj = self.getjson(url='/?file=/bin/sh')['body']
assert obj['FileExists'] == False, 'file should not exists'
assert not obj['FileExists'], 'file should not exists'
def test_go_isolation_rootfs_automount_tmpfs(self, is_su, temp_dir):
try: