Deleted
Added
test_go_isolation.py (1740:53149d20bb97) | test_go_isolation.py (1768:3a9850ceccfc) |
---|---|
1import grp 2import os 3import pwd 4import shutil 5 6import pytest 7 8from unit.applications.lang.go import TestApplicationGo --- 328 unchanged lines hidden (view full) --- 337 338 if not is_su: 339 isolation['namespaces'] = { 340 'mount': True, 341 'credential': True, 342 'pid': True 343 } 344 | 1import grp 2import os 3import pwd 4import shutil 5 6import pytest 7 8from unit.applications.lang.go import TestApplicationGo --- 328 unchanged lines hidden (view full) --- 337 338 if not is_su: 339 isolation['namespaces'] = { 340 'mount': True, 341 'credential': True, 342 'pid': True 343 } 344 |
345 isolation['automount'] = { 346 'tmpfs': False 347 } 348 |
|
345 self.load('ns_inspect', isolation=isolation) 346 347 obj = self.getjson(url='/?mounts=true')['body'] 348 349 assert ( | 349 self.load('ns_inspect', isolation=isolation) 350 351 obj = self.getjson(url='/?mounts=true')['body'] 352 353 assert ( |
350 "/ /tmp" in obj['Mounts'] and "tmpfs" in obj['Mounts'] 351 ), 'app has /tmp mounted on /' | 354 "/ /tmp" not in obj['Mounts'] and "tmpfs" not in obj['Mounts'] 355 ), 'app has no /tmp mounted' |
352 353 isolation['automount'] = { | 356 357 isolation['automount'] = { |
354 'tmpfs': False | 358 'tmpfs': True |
355 } 356 357 self.load('ns_inspect', isolation=isolation) 358 359 obj = self.getjson(url='/?mounts=true')['body'] 360 361 assert ( | 359 } 360 361 self.load('ns_inspect', isolation=isolation) 362 363 obj = self.getjson(url='/?mounts=true')['body'] 364 365 assert ( |
362 "/ /tmp" not in obj['Mounts'] and "tmpfs" not in obj['Mounts'] 363 ), 'app has no /tmp mounted' | 366 "/ /tmp" in obj['Mounts'] and "tmpfs" in obj['Mounts'] 367 ), 'app has /tmp mounted on /' |