summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-08-24 08:47:52 -0400
committerTodd Gamblin <tgamblin@llnl.gov>2017-08-24 16:17:35 -0700
commit0e7071befe0943e55ee585e3998bd0c262d5a233 (patch)
treed4896bfdd3390185b8f4f9ff84c361fc8e96b9e4 /lib
parentf564b2abf75ae01ea95b6995de517c91fb0462b7 (diff)
downloadspack-0e7071befe0943e55ee585e3998bd0c262d5a233.tar.gz
spack-0e7071befe0943e55ee585e3998bd0c262d5a233.tar.bz2
spack-0e7071befe0943e55ee585e3998bd0c262d5a233.tar.xz
spack-0e7071befe0943e55ee585e3998bd0c262d5a233.zip
test/gpg: init from the testing key directory
The old testing pattern set an attribute on the parser directly. Now that there is a parsed flag, use it instead.
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/cmd/gpg.py13
1 files changed, 2 insertions, 11 deletions
diff --git a/lib/spack/spack/test/cmd/gpg.py b/lib/spack/spack/test/cmd/gpg.py
index 97f7accd60..111436f24f 100644
--- a/lib/spack/spack/test/cmd/gpg.py
+++ b/lib/spack/spack/test/cmd/gpg.py
@@ -40,14 +40,6 @@ def testing_gpg_directory(tmpdir):
@pytest.fixture(scope='function')
-def mock_gpg_config():
- orig_gpg_keys_path = spack.gpg_keys_path
- spack.gpg_keys_path = spack.mock_gpg_keys_path
- yield
- spack.gpg_keys_path = orig_gpg_keys_path
-
-
-@pytest.fixture(scope='function')
def gpg():
return SpackCommand('gpg')
@@ -60,16 +52,15 @@ def has_gnupg2():
return False
-@pytest.mark.xfail # TODO: fix failing tests.
@pytest.mark.skipif(not has_gnupg2(),
reason='These tests require gnupg2')
-def test_gpg(gpg, tmpdir, testing_gpg_directory, mock_gpg_config):
+def test_gpg(gpg, tmpdir, testing_gpg_directory):
# Verify a file with an empty keyring.
with pytest.raises(ProcessError):
gpg('verify', os.path.join(spack.mock_gpg_data_path, 'content.txt'))
# Import the default key.
- gpg('init')
+ gpg('init', '--from', spack.mock_gpg_keys_path)
# List the keys.
# TODO: Test the output here.