diff options
author | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-10-16 17:14:15 +0100 |
---|---|---|
committer | Tristan Maat <tristan.maat@codethink.co.uk> | 2019-12-03 10:45:08 +0000 |
commit | 320b3f2efed977bc11903e5c981a17f7a709022c (patch) | |
tree | 1e14355dfdd1cb0b1b37853024156c7ae5b9bd4e /tests/sourcecache/fetch.py | |
parent | e660e0946ca9a6a58e4aae1d856eb14db99f3f68 (diff) | |
download | buildstream-320b3f2efed977bc11903e5c981a17f7a709022c.tar.gz |
Remove newly unused API surfaces in CASCache
This also involves a number of changes to tests and other parts of the
codebase since they were hacking about wit API that shouldn't have
existed.
Diffstat (limited to 'tests/sourcecache/fetch.py')
-rw-r--r-- | tests/sourcecache/fetch.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/sourcecache/fetch.py b/tests/sourcecache/fetch.py index 0c347ebbf..4096b56b8 100644 --- a/tests/sourcecache/fetch.py +++ b/tests/sourcecache/fetch.py @@ -37,6 +37,7 @@ DATA_DIR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "project") def move_local_cas_to_remote_source_share(local, remote): shutil.rmtree(os.path.join(remote, "repo", "cas")) + shutil.rmtree(os.path.join(remote, "repo", "source_protos")) shutil.move(os.path.join(local, "source_protos"), os.path.join(remote, "repo")) shutil.move(os.path.join(local, "cas"), os.path.join(remote, "repo")) shutil.rmtree(os.path.join(local, "sources")) @@ -85,8 +86,7 @@ def test_source_fetch(cli, tmpdir, datafiles): assert not element._source_cached() source = list(element.sources())[0] - cas = context.get_cascache() - assert not cas.contains(source._get_source_name()) + assert not share.get_source_proto(source._get_source_name()) # Just check that we sensibly fetch and build the element res = cli.run(project=project_dir, args=["build", element_name]) @@ -132,8 +132,7 @@ def test_fetch_fallback(cli, tmpdir, datafiles): assert not element._source_cached() source = list(element.sources())[0] - cas = context.get_cascache() - assert not cas.contains(source._get_source_name()) + assert not share.get_source_proto(source._get_source_name()) assert not os.path.exists(os.path.join(cache_dir, "sources")) # Now check if it falls back to the source fetch method. @@ -195,8 +194,7 @@ def test_source_pull_partial_fallback_fetch(cli, tmpdir, datafiles): assert not element._source_cached() source = list(element.sources())[0] - cas = context.get_cascache() - assert not cas.contains(source._get_source_name()) + assert not share.get_artifact_proto(source._get_source_name()) # Just check that we sensibly fetch and build the element res = cli.run(project=project_dir, args=["build", element_name]) |