mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-05-06 22:18:28 +00:00
improve api tests and error output
show only relevant aptly logs if a test fails. for async tasks, show task output, as it contains the error message.
This commit is contained in:
@@ -7,11 +7,16 @@ from api_lib import APITest
|
||||
|
||||
|
||||
def check_gpgkey_exists(gpg_key, keyring):
|
||||
subprocess.check_call([
|
||||
p = subprocess.Popen([
|
||||
"gpg", "--no-default-keyring",
|
||||
"--keyring", keyring,
|
||||
"--fingerprint", gpg_key,
|
||||
])
|
||||
"--fingerprint", gpg_key],
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
)
|
||||
p.communicate()
|
||||
if p.returncode != 0:
|
||||
raise Exception("gpg key does not exists")
|
||||
|
||||
|
||||
class GPGAPITestAddKey(APITest):
|
||||
|
||||
Reference in New Issue
Block a user