diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-02-14 17:23:37 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2018-02-26 10:48:35 +0000 |
commit | 50492d2dc88c3b6e259595c2b7bc1c2b60274213 (patch) | |
tree | cf3c5ca4f008563b2a3a76424b9ba8fc3ae4eac8 /tests/testutils/runcli.py | |
parent | f9e9946207256f6b054d92484a094a3d3ad79582 (diff) | |
download | buildstream-50492d2dc88c3b6e259595c2b7bc1c2b60274213.tar.gz |
tests/frontend/push.py: Test that we don't push stuff that we just pulledsam/233-push-after-pull
Diffstat (limited to 'tests/testutils/runcli.py')
-rw-r--r-- | tests/testutils/runcli.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/testutils/runcli.py b/tests/testutils/runcli.py index a913c4aa2..d18fa279d 100644 --- a/tests/testutils/runcli.py +++ b/tests/testutils/runcli.py @@ -157,6 +157,20 @@ class Result(): return list(tracked) + def get_pushed_elements(self): + pushed = re.findall(r'\[\s*push:(\S+)\s*\]\s*START\s*Pushing Artifact', self.stderr) + if pushed is None: + return [] + + return list(pushed) + + def get_pulled_elements(self): + pulled = re.findall(r'\[\s*pull:(\S+)\s*\]\s*START', self.stderr) + if pulled is None: + return [] + + return list(pulled) + class Cli(): |