From a0350d473fe88c1f40113a5b4e8255149def2177 Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Wed, 10 Apr 2019 18:03:15 +0100 Subject: tests: Fix all remaining references to bst pull As the `bst pull` is now called `bst artifact pull`, update the remaining comments in testsuite that still refer to it as `bst pull`. --- tests/artifactcache/junctions.py | 2 +- tests/frontend/pull.py | 18 +++++++++--------- tests/integration/pullbuildtrees.py | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tests') diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py index 6655a4f1d..cf655a93b 100644 --- a/tests/artifactcache/junctions.py +++ b/tests/artifactcache/junctions.py @@ -77,7 +77,7 @@ def test_push_pull(cli, tmpdir, datafiles): state = cli.get_element_state(base_project, 'target.bst') assert state != 'cached' - # Now try bst pull + # Now try bst artifact pull result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst']) assert result.exit_code == 0 diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index a2cbffa04..de12e1d6b 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -44,7 +44,7 @@ def assert_not_shared(cli, share, project, element_name): # Tests that: # # * `bst build` pushes all build elements to configured 'push' cache -# * `bst pull --deps all` downloads everything from cache after local deletion +# * `bst artifact pull --deps all` downloads everything from cache after local deletion # @pytest.mark.datafiles(DATA_DIR) def test_push_pull_all(cli, tmpdir, datafiles): @@ -75,7 +75,7 @@ def test_push_pull_all(cli, tmpdir, datafiles): states = cli.get_element_states(project, all_elements) assert not any(states[e] == 'cached' for e in all_elements) - # Now try bst pull + # Now try bst artifact pull result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst']) result.assert_success() @@ -87,7 +87,7 @@ def test_push_pull_all(cli, tmpdir, datafiles): # Tests that: # # * `bst push` (default targets) pushes all built elements to configured 'push' cache -# * `bst pull` (default targets) downloads everything from cache after local deletion +# * `bst artifact pull` (default targets) downloads everything from cache after local deletion # @pytest.mark.datafiles(DATA_DIR + '_world') def test_push_pull_default_targets(cli, tmpdir, datafiles): @@ -125,7 +125,7 @@ def test_push_pull_default_targets(cli, tmpdir, datafiles): states = cli.get_element_states(project, all_elements) assert not any(states[e] == 'cached' for e in all_elements) - # Now try bst pull + # Now try bst artifact pull result = cli.run(project=project, args=['artifact', 'pull']) result.assert_success() @@ -137,7 +137,7 @@ def test_push_pull_default_targets(cli, tmpdir, datafiles): # Tests that: # # * `bst build` pushes all build elements ONLY to configured 'push' cache -# * `bst pull` finds artifacts that are available only in the secondary cache +# * `bst artifact pull` finds artifacts that are available only in the secondary cache # @pytest.mark.datafiles(DATA_DIR) def test_pull_secondary_cache(cli, tmpdir, datafiles): @@ -166,7 +166,7 @@ def test_pull_secondary_cache(cli, tmpdir, datafiles): # Assert that the element is not cached anymore. assert cli.get_element_state(project, 'target.bst') != 'cached' - # Now try bst pull + # Now try bst artifact pull result = cli.run(project=project, args=['artifact', 'pull', 'target.bst']) result.assert_success() @@ -178,7 +178,7 @@ def test_pull_secondary_cache(cli, tmpdir, datafiles): # Tests that: # # * `bst push --remote` pushes to the given remote, not one from the config -# * `bst pull --remote` pulls from the given remote +# * `bst artifact pull --remote` pulls from the given remote # @pytest.mark.datafiles(DATA_DIR) def test_push_pull_specific_remote(cli, tmpdir, datafiles): @@ -269,7 +269,7 @@ def test_push_pull_non_strict(cli, tmpdir, datafiles): # Assert that the target is still waiting due to --no-strict assert cli.get_element_state(project, 'target.bst') == 'waiting' - # Now try bst pull + # Now try bst artifact pull result = cli.run(project=project, args=['artifact', 'pull', '--deps', 'all', 'target.bst']) result.assert_success() @@ -344,7 +344,7 @@ def test_push_pull_cross_junction(cli, tmpdir, datafiles): assert cli.get_element_state(project, 'junction.bst:import-etc.bst') == 'buildable' - # Now try bst pull + # Now try bst artifact pull result = cli.run(project=project, args=['artifact', 'pull', 'junction.bst:import-etc.bst']) result.assert_success() diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py index 1a89f776a..5eb835cd3 100644 --- a/tests/integration/pullbuildtrees.py +++ b/tests/integration/pullbuildtrees.py @@ -147,7 +147,7 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles): # Assert that if we add an extra remote that has the buildtree artfact cached, bst push will # automatically attempt to pull it and will be successful, leading to the full artifact being pushed # to the empty share3. This gives the ability to attempt push currently partial artifacts to a remote, - # without exlipictly requiring a bst pull. + # without exlipictly requiring a bst artifact pull. cli2.configure({'artifacts': [{'url': share1.repo, 'push': False}, {'url': share3.repo, 'push': True}]}) result = cli2.run(project=project, args=['--pull-buildtrees', 'artifact', 'push', element_name]) assert "Attempting to fetch missing artifact buildtrees" in result.stderr -- cgit v1.2.1 From 1929ec83ecefbdebfd0e0004e75c89460f9666b4 Mon Sep 17 00:00:00 2001 From: Chandan Singh Date: Wed, 10 Apr 2019 18:07:47 +0100 Subject: tests: Fix all remaining references to bst push As the `bst push` is now called `bst artifact push`, update the remaining comments in testsuite that still refer to it as `bst push`. --- tests/artifactcache/junctions.py | 2 +- tests/frontend/pull.py | 6 +++--- tests/frontend/push.py | 12 ++++++------ tests/integration/pullbuildtrees.py | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) (limited to 'tests') diff --git a/tests/artifactcache/junctions.py b/tests/artifactcache/junctions.py index cf655a93b..9b7ebe2ec 100644 --- a/tests/artifactcache/junctions.py +++ b/tests/artifactcache/junctions.py @@ -57,7 +57,7 @@ def test_push_pull(cli, tmpdir, datafiles): project_set_artifacts(project, share.repo) project_set_artifacts(base_project, base_share.repo) - # Now try bst push + # Now try bst artifact push result = cli.run(project=project, args=['artifact', 'push', '--deps', 'all', 'target.bst']) assert result.exit_code == 0 diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index de12e1d6b..2a1006ea2 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -86,7 +86,7 @@ def test_push_pull_all(cli, tmpdir, datafiles): # Tests that: # -# * `bst push` (default targets) pushes all built elements to configured 'push' cache +# * `bst artifact push` (default targets) pushes all built elements to configured 'push' cache # * `bst artifact pull` (default targets) downloads everything from cache after local deletion # @pytest.mark.datafiles(DATA_DIR + '_world') @@ -177,7 +177,7 @@ def test_pull_secondary_cache(cli, tmpdir, datafiles): # Tests that: # -# * `bst push --remote` pushes to the given remote, not one from the config +# * `bst artifact push --remote` pushes to the given remote, not one from the config # * `bst artifact pull --remote` pulls from the given remote # @pytest.mark.datafiles(DATA_DIR) @@ -200,7 +200,7 @@ def test_push_pull_specific_remote(cli, tmpdir, datafiles): 'artifacts': {'url': bad_share.repo, 'push': True}, }) - # Now try `bst push` to the good_share. + # Now try `bst artifact push` to the good_share. result = cli.run(project=project, args=[ 'artifact', 'push', 'target.bst', '--remote', good_share.repo ]) diff --git a/tests/frontend/push.py b/tests/frontend/push.py index 061607446..7b4e944d4 100644 --- a/tests/frontend/push.py +++ b/tests/frontend/push.py @@ -64,8 +64,8 @@ def assert_not_shared(cli, share, project, element_name): # Tests that: # -# * `bst push` fails if there are no remotes configured for pushing -# * `bst push` successfully pushes to any remote that is configured for pushing +# * `bst artifact push` fails if there are no remotes configured for pushing +# * `bst artifact push` successfully pushes to any remote that is configured for pushing # @pytest.mark.datafiles(DATA_DIR) def test_push(cli, tmpdir, datafiles): @@ -87,7 +87,7 @@ def test_push(cli, tmpdir, datafiles): result = cli.run(project=project, args=['artifact', 'push', 'target.bst']) result.assert_main_error(ErrorDomain.STREAM, None) - # Configure bst to pull but not push from a cache and run `bst push`. + # Configure bst to pull but not push from a cache and run `bst artifact push`. # This should also fail. cli.configure({ 'artifacts': {'url': share1.repo, 'push': False}, @@ -95,7 +95,7 @@ def test_push(cli, tmpdir, datafiles): result = cli.run(project=project, args=['artifact', 'push', 'target.bst']) result.assert_main_error(ErrorDomain.STREAM, None) - # Configure bst to push to one of the caches and run `bst push`. This works. + # Configure bst to push to one of the caches and run `bst artifact push`. This works. cli.configure({ 'artifacts': [ {'url': share1.repo, 'push': False}, @@ -122,7 +122,7 @@ def test_push(cli, tmpdir, datafiles): assert_shared(cli, share2, project, 'target.bst') -# Tests that `bst push --deps all` pushes all dependencies of the given element. +# Tests that `bst artifact push --deps all` pushes all dependencies of the given element. # @pytest.mark.datafiles(DATA_DIR) def test_push_all(cli, tmpdir, datafiles): @@ -156,7 +156,7 @@ def test_push_all(cli, tmpdir, datafiles): } }) - # Now try bst push all the deps + # Now try bst artifact push all the deps result = cli.run(project=project, args=[ 'artifact', 'push', 'target.bst', '--deps', 'all' diff --git a/tests/integration/pullbuildtrees.py b/tests/integration/pullbuildtrees.py index 5eb835cd3..bdbcad911 100644 --- a/tests/integration/pullbuildtrees.py +++ b/tests/integration/pullbuildtrees.py @@ -129,7 +129,7 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles): assert share2.has_artifact('test', element_name, cli2.get_element_key(project, element_name)) default_state(cli2, tmpdir, share1) - # Assert that bst push will automatically attempt to pull a missing buildtree + # Assert that bst artifact push will automatically attempt to pull a missing buildtree # if pull-buildtrees is set, however as share3 is the only defined remote and is empty, # assert that no element artifact buildtrees are pulled (no available remote buildtree) and thus the # artifact cannot be pushed. @@ -144,7 +144,7 @@ def test_pullbuildtrees(cli2, tmpdir, datafiles): assert element_name not in result.get_pushed_elements() assert not share3.has_artifact('test', element_name, cli2.get_element_key(project, element_name)) - # Assert that if we add an extra remote that has the buildtree artfact cached, bst push will + # Assert that if we add an extra remote that has the buildtree artfact cached, bst artifact push will # automatically attempt to pull it and will be successful, leading to the full artifact being pushed # to the empty share3. This gives the ability to attempt push currently partial artifacts to a remote, # without exlipictly requiring a bst artifact pull. -- cgit v1.2.1