Class usage came from the unittest framework and it was always redundant after migration to the pytest. This commit removes classes from files containing tests to make them more readable and understandable.
20 lines
532 B
Python
20 lines
532 B
Python
from unit.applications.lang.go import ApplicationGo
|
|
|
|
prerequisites = {
|
|
'modules': {'go': 'all'},
|
|
'features': {'isolation': True},
|
|
'privileged_user': True,
|
|
}
|
|
|
|
client = ApplicationGo()
|
|
|
|
|
|
def test_go_isolation_rootfs_chroot(temp_dir):
|
|
client.load('ns_inspect', isolation={'rootfs': temp_dir})
|
|
|
|
obj = client.getjson(url='/?file=/go/app')['body']
|
|
assert obj['FileExists'], 'app relative to rootfs'
|
|
|
|
obj = client.getjson(url='/?file=/bin/sh')['body']
|
|
assert not obj['FileExists'], 'file should not exists'
|