diff options
Diffstat (limited to 'tests/artifactcache/pull.py')
| -rw-r--r-- | tests/artifactcache/pull.py | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/tests/artifactcache/pull.py b/tests/artifactcache/pull.py index 6c4134b0b..188f4cf97 100644 --- a/tests/artifactcache/pull.py +++ b/tests/artifactcache/pull.py @@ -57,9 +57,7 @@ def test_pull(cli, tmpdir, datafiles): # Assert that we are now cached locally assert cli.get_element_state(project_dir, "target.bst") == "cached" # Assert that we shared/pushed the cached artifact - assert share.get_artifact( - cli.get_artifact_name(project_dir, "test", "target.bst") - ) + assert share.get_artifact(cli.get_artifact_name(project_dir, "test", "target.bst")) # Delete the artifact locally cli.remove_artifact_from_cache(project_dir, "target.bst") @@ -91,9 +89,7 @@ def test_pull(cli, tmpdir, datafiles): # Manually setup the CAS remote artifactcache.setup_remotes(use_config=True) - assert artifactcache.has_push_remotes( - plugin=element - ), "No remote configured for element target.bst" + assert artifactcache.has_push_remotes(plugin=element), "No remote configured for element target.bst" assert artifactcache.pull(element, element_key), "Pull operation failed" assert cli.artifact.is_cached(cache_dir, element, element_key) @@ -126,9 +122,7 @@ def test_pull_tree(cli, tmpdir, datafiles): # Assert that we are now cached locally assert cli.get_element_state(project_dir, "target.bst") == "cached" # Assert that we shared/pushed the cached artifact - assert share.get_artifact( - cli.get_artifact_name(project_dir, "test", "target.bst") - ) + assert share.get_artifact(cli.get_artifact_name(project_dir, "test", "target.bst")) with dummy_context(config=user_config_file) as context: # Load the project and CAS cache @@ -142,9 +136,7 @@ def test_pull_tree(cli, tmpdir, datafiles): assert cli.artifact.is_cached(rootcache_dir, element, element_key) # Retrieve the Directory object from the cached artifact - artifact_digest = cli.artifact.get_digest( - rootcache_dir, element, element_key - ) + artifact_digest = cli.artifact.get_digest(rootcache_dir, element, element_key) artifactcache = context.artifactcache # Manually setup the CAS remote @@ -173,9 +165,7 @@ def test_pull_tree(cli, tmpdir, datafiles): cas.close_grpc_channels() assert cli.get_element_state(project_dir, "target.bst") != "cached" - tree_digest = remote_execution_pb2.Digest( - hash=tree_hash, size_bytes=tree_size - ) + tree_digest = remote_execution_pb2.Digest(hash=tree_hash, size_bytes=tree_size) # Pull the artifact using the Tree object directory_digest = artifactcache.pull_tree(project, artifact_digest) @@ -187,9 +177,7 @@ def test_pull_tree(cli, tmpdir, datafiles): # Directory size now zero with AaaP and stack element commit #1cbc5e63dc assert directory_hash and not directory_size - directory_digest = remote_execution_pb2.Digest( - hash=directory_hash, size_bytes=directory_size - ) + directory_digest = remote_execution_pb2.Digest(hash=directory_hash, size_bytes=directory_size) # Ensure the entire Tree stucture has been pulled assert os.path.exists(cas.objpath(directory_digest)) |
