tests: fix failing test_hash_change
The full hash appears twice in the spec dict now, replacing just the value replaces it under "hash" and "full_hash". Only replace the one that appears after "full_hash". I'm actually not sure what purpose this test served, so maybe it could be removed, as it may be testing some distinction between full and dag hash which no longer exists.
This commit is contained in:
parent
e02020c80a
commit
32a2c22b2b
1 changed files with 4 additions and 2 deletions
|
@ -256,9 +256,11 @@ def test_hash_change(mock_test_stage, mock_packages, mock_archive, mock_fetch,
|
|||
outfile = os.path.join(testdir, 'test_suite.lock')
|
||||
with open(outfile, 'r') as f:
|
||||
output = f.read()
|
||||
val_replace = '"full_hash": "{0}"'.format(
|
||||
spack.store.db.query('printing-package')[0].full_hash())
|
||||
changed_hash = output.replace(
|
||||
spack.store.db.query('printing-package')[0].full_hash(),
|
||||
'fakehash492ucwhwvzhxfbmcc45x49ha')
|
||||
val_replace,
|
||||
'"full_hash": "fakehash492ucwhwvzhxfbmcc45x49ha"')
|
||||
with open(outfile, 'w') as f:
|
||||
f.write(changed_hash)
|
||||
|
||||
|
|
Loading…
Reference in a new issue