diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-01-01 19:16:32 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-01-01 19:44:53 +0900 |
commit | 54265b7a9e6f493796bcb9c65682a73013e2a600 (patch) | |
tree | d178b17ac2e62497b5217da63d65558da894d2cc /tests/frontend/pull.py | |
parent | c1b3a483d17337b45c9118ba2580437a89db2271 (diff) | |
download | buildstream-54265b7a9e6f493796bcb9c65682a73013e2a600.tar.gz |
tests/frontend: Updating tests to use new error checks
This also fixes #177 - the problem here was solved simply
by passing the project directory to `cli.run(project=project...)`
Diffstat (limited to 'tests/frontend/pull.py')
-rw-r--r-- | tests/frontend/pull.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/frontend/pull.py b/tests/frontend/pull.py index 96e1c68a5..530c1e047 100644 --- a/tests/frontend/pull.py +++ b/tests/frontend/pull.py @@ -40,7 +40,7 @@ def test_push_pull(cli, tmpdir, datafiles, override_url, project_url, user_url): # First build it without the artifact cache configured result = cli.run(project=project, args=['build', 'import-bin.bst']) - assert result.exit_code == 0 + result.assert_success() # Assert that we are now cached locally state = cli.get_element_state(project, 'import-bin.bst') @@ -76,7 +76,7 @@ def test_push_pull(cli, tmpdir, datafiles, override_url, project_url, user_url): # Now try bst push result = cli.run(project=project, args=['push', 'import-bin.bst']) - assert result.exit_code == 0 + result.assert_success() # And finally assert that the artifact is in the share assert_shared(cli, share, project, 'import-bin.bst') @@ -99,7 +99,7 @@ def test_push_pull(cli, tmpdir, datafiles, override_url, project_url, user_url): # Now try bst pull result = cli.run(project=project, args=['pull', 'import-bin.bst']) - assert result.exit_code == 0 + result.assert_success() # And assert that it's again in the local cache, without having built state = cli.get_element_state(project, 'import-bin.bst') @@ -114,7 +114,7 @@ def test_push_pull_all(cli, tmpdir, datafiles): # First build it without the artifact cache configured result = cli.run(project=project, args=['build', 'target.bst']) - assert result.exit_code == 0 + result.assert_success() # Assert that we are now cached locally state = cli.get_element_state(project, 'target.bst') @@ -140,7 +140,7 @@ def test_push_pull_all(cli, tmpdir, datafiles): # Now try bst push result = cli.run(project=project, args=['push', '--deps', 'all', 'target.bst']) - assert result.exit_code == 0 + result.assert_success() # And finally assert that the artifact is in the share all_elements = ['target.bst', 'import-bin.bst', 'import-dev.bst', 'compose-all.bst'] @@ -166,7 +166,7 @@ def test_push_pull_all(cli, tmpdir, datafiles): # Now try bst pull result = cli.run(project=project, args=['pull', '--deps', 'all', 'target.bst']) - assert result.exit_code == 0 + result.assert_success() # And assert that it's again in the local cache, without having built for element_name in all_elements: |