mirror of
https://github.com/laurivosandi/certidude
synced 2024-12-22 16:25:17 +00:00
tests: Lazier import for xattr
This commit is contained in:
parent
a48331a9cb
commit
486a5d3459
@ -1,5 +1,4 @@
|
|||||||
import pwd
|
import pwd
|
||||||
from xattr import listxattr, getxattr
|
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from time import sleep
|
from time import sleep
|
||||||
@ -561,6 +560,7 @@ def test_cli_setup_authority():
|
|||||||
assert r.status_code == 200, r.text # lease update ok
|
assert r.status_code == 200, r.text # lease update ok
|
||||||
|
|
||||||
# Attempt to fetch and execute default.sh script
|
# Attempt to fetch and execute default.sh script
|
||||||
|
from xattr import listxattr, getxattr
|
||||||
assert not [j for j in listxattr("/var/lib/certidude/ca.example.lan/signed/test.pem") if j.startswith("user.machine.")]
|
assert not [j for j in listxattr("/var/lib/certidude/ca.example.lan/signed/test.pem") if j.startswith("user.machine.")]
|
||||||
#os.system("curl http://ca.example.lan/api/signed/test/script | bash")
|
#os.system("curl http://ca.example.lan/api/signed/test/script | bash")
|
||||||
r = client().simulate_post("/api/signed/test/attr", body="cpu=i5&mem=512M&dist=Ubuntu",
|
r = client().simulate_post("/api/signed/test/attr", body="cpu=i5&mem=512M&dist=Ubuntu",
|
||||||
|
Loading…
Reference in New Issue
Block a user