diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2017-12-05 18:38:13 +0000 |
---|---|---|
committer | Jürg Billeter <j@bitron.ch> | 2017-12-12 08:10:22 +0100 |
commit | 8aa2fbc98b57a8c3f9392bb12ca77b0f47a7d602 (patch) | |
tree | aca01c9919fae5eff94b34921c9013c347809aa9 | |
parent | 8a85df22ec433d8ec78c9b47faaa9b2ff4f2ad5d (diff) | |
download | buildstream-8aa2fbc98b57a8c3f9392bb12ca77b0f47a7d602.tar.gz |
tests/frontend: Reverse ordering of cache specifications
The cache parameters are now in highest-to-lowest precidence
order corresponding to left-to-right along the line where they are
specified.
Once we make it possible to specify a list of URLs for each of these
parameters, the precidence will continue to always read from highest
to lowest corresponding to left-to-right since each list of URLs
will also read left-to-right.
-rw-r--r-- | tests/frontend/pull.py | 14 | ||||
-rw-r--r-- | tests/frontend/push.py | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 116bc9e49..96e1c68a5 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -27,14 +27,14 @@ def assert_shared(cli, share, project, element_name): @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.parametrize( - 'user_url, project_url, override_url', + 'override_url, project_url, user_url', [ - pytest.param('share.repo', '', '', id='user-config'), - pytest.param('/tmp/share/user', 'share.repo', '', id='project-config'), - pytest.param('/tmp/share/user', '/tmp/share/project', 'share.repo', id='project-override-in-user-config'), + pytest.param('', '', 'share.repo', id='user-config'), + pytest.param('', 'share.repo', '/tmp/share/user', id='project-config'), + pytest.param('share.repo', '/tmp/share/project', '/tmp/share/user', id='project-override-in-user-config'), ]) @pytest.mark.datafiles(DATA_DIR) -def test_push_pull(cli, tmpdir, datafiles, user_url, project_url, override_url): +def test_push_pull(cli, tmpdir, datafiles, override_url, project_url, user_url): project = os.path.join(datafiles.dirname, datafiles.basename) share = create_artifact_share(os.path.join(str(tmpdir), 'artifactshare')) @@ -46,9 +46,9 @@ def test_push_pull(cli, tmpdir, datafiles, user_url, project_url, override_url): state = cli.get_element_state(project, 'import-bin.bst') assert state == 'cached' - user_url = share.repo if user_url == 'share.repo' else user_url - project_url = share.repo if project_url == 'share.repo' else project_url override_url = share.repo if override_url == 'share.repo' else override_url + project_url = share.repo if project_url == 'share.repo' else project_url + user_url = share.repo if user_url == 'share.repo' else user_url # Configure artifact share cli.configure({ diff --git a/tests/frontend/push.py b/tests/frontend/push.py index d4ae6c6dc..ced42acf3 100644 --- a/tests/frontend/push.py +++ b/tests/frontend/push.py @@ -26,14 +26,14 @@ def assert_shared(cli, share, project, element_name): @pytest.mark.skipif(not IS_LINUX, reason='Only available on linux') @pytest.mark.parametrize( - 'user_url, project_url, override_url', + 'override_url, project_url, user_url', [ - pytest.param('share.repo', '', '', id='user-config'), - pytest.param('/tmp/share/user', 'share.repo', '', id='project-config'), - pytest.param('/tmp/share/user', '/tmp/share/project', 'share.repo', id='project-override-in-user-config'), + pytest.param('', '', 'share.repo', id='user-config'), + pytest.param('', 'share.repo', '/tmp/share/user', id='project-config'), + pytest.param('share.repo', '/tmp/share/project', '/tmp/share/user', id='project-override-in-user-config'), ]) @pytest.mark.datafiles(DATA_DIR) -def test_push(cli, tmpdir, datafiles, user_url, project_url, override_url): +def test_push(cli, tmpdir, datafiles, override_url, user_url, project_url): project = str(datafiles) share = create_artifact_share(os.path.join(str(tmpdir), 'artifactshare')) @@ -45,9 +45,9 @@ def test_push(cli, tmpdir, datafiles, user_url, project_url, override_url): state = cli.get_element_state(project, 'target.bst') assert state == 'cached' - user_url = share.repo if user_url == 'share.repo' else user_url - project_url = share.repo if project_url == 'share.repo' else project_url override_url = share.repo if override_url == 'share.repo' else override_url + project_url = share.repo if project_url == 'share.repo' else project_url + user_url = share.repo if user_url == 'share.repo' else user_url # Configure artifact share cli.configure({ |