-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #434 from znewman01/fixgpgimport
Double-check that GPG tests run where expected.
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/usr/bin/env python | ||
|
||
""" | ||
<Program Name> | ||
check_gpg_available.py | ||
<Author> | ||
Zack Newman <[email protected]> | ||
<Started> | ||
September 30, 2022. | ||
<Copyright> | ||
See LICENSE for licensing information. | ||
<Purpose> | ||
The test suite passes even if GPG is not available, because GPG-dependent | ||
tests are skipped if GPG is not present. | ||
This file asserts the availability of GPG, so CI environments that expect GPG | ||
will notice if it goes away unexpectedly rather than silently skipping the GPG | ||
tests. | ||
NOTE: the filename is purposefully check_ rather than test_ so that test | ||
discovery doesn't find this unittest and the tests within are only run | ||
when explicitly invoked. | ||
""" | ||
|
||
import unittest | ||
|
||
import securesystemslib.gpg.constants | ||
|
||
|
||
class TestGpgAvailable(unittest.TestCase): | ||
"""Test that securesystemslib finds some GPG executable in the environment.""" | ||
|
||
def test_gpg_available(self): | ||
"""Test that GPG is available.""" | ||
self.assertTrue(securesystemslib.gpg.constants.HAVE_GPG) | ||
|
||
if __name__ == "__main__": | ||
unittest.main(verbosity=1, buffer=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters