summaryrefslogtreecommitdiff
path: root/tests/frontend/track.py
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-01 19:16:32 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-01-01 19:44:53 +0900
commit54265b7a9e6f493796bcb9c65682a73013e2a600 (patch)
treed178b17ac2e62497b5217da63d65558da894d2cc /tests/frontend/track.py
parentc1b3a483d17337b45c9118ba2580437a89db2271 (diff)
downloadbuildstream-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/track.py')
-rw-r--r--tests/frontend/track.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/frontend/track.py b/tests/frontend/track.py
index f83237545..aa8cff6d1 100644
--- a/tests/frontend/track.py
+++ b/tests/frontend/track.py
@@ -46,14 +46,14 @@ def test_track(cli, tmpdir, datafiles, kind):
# Now first try to track it
result = cli.run(project=project, args=['track', element_name])
- assert result.exit_code == 0
+ result.assert_success()
# And now fetch it: The Source has probably already cached the
# latest ref locally, but it is not required to have cached
# the associated content of the latest ref at track time, that
# is the job of fetch.
result = cli.run(project=project, args=['fetch', element_name])
- assert result.exit_code == 0
+ result.assert_success()
# Assert that we are now buildable because the source is
# now cached.
@@ -88,7 +88,7 @@ def test_track_recurse(cli, tmpdir, datafiles, kind):
result = cli.run(project=project, args=[
'track', '--deps', 'all',
element_target_name])
- assert result.exit_code == 0
+ result.assert_success()
# And now fetch it: The Source has probably already cached the
# latest ref locally, but it is not required to have cached
@@ -97,7 +97,7 @@ def test_track_recurse(cli, tmpdir, datafiles, kind):
result = cli.run(project=project, args=[
'fetch', '--deps', 'all',
element_target_name])
- assert result.exit_code == 0
+ result.assert_success()
# Assert that the dependency is buildable and the target is waiting
assert cli.get_element_state(project, element_dep_name) == 'buildable'
@@ -132,7 +132,7 @@ def test_track_recurse_except(cli, tmpdir, datafiles, kind):
result = cli.run(project=project, args=[
'track', '--deps', 'all', '--except', element_dep_name,
element_target_name])
- assert result.exit_code == 0
+ result.assert_success()
# And now fetch it: The Source has probably already cached the
# latest ref locally, but it is not required to have cached
@@ -141,7 +141,7 @@ def test_track_recurse_except(cli, tmpdir, datafiles, kind):
result = cli.run(project=project, args=[
'fetch', '--deps', 'none',
element_target_name])
- assert result.exit_code == 0
+ result.assert_success()
# Assert that the dependency is buildable and the target is waiting
assert cli.get_element_state(project, element_dep_name) == 'no reference'