summaryrefslogtreecommitdiff
path: root/yarns/900-implements.yarn
diff options
context:
space:
mode:
authorLars Wirzenius <liw@exolobe1>2018-05-13 15:30:23 +0300
committerLars Wirzenius <liw@liw.fi>2018-05-17 21:44:59 +0300
commitb11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1 (patch)
tree2e6b085f8fb023d53c8ac20a97aef2c7d1c11d4b /yarns/900-implements.yarn
parent531dd2c50bfdfcf50bb37f57cf9fc2b69787adcf (diff)
downloadick2-b11d31ef23c5dfee6bfa54afbec47fc8b8bab7b1.tar.gz
Change: how controller stores persistent data
Replace old State class with new FilePersistentState and TransactionalState classes. Use new Resource class instead of raw dicts. Use context managers for creating, updating resources, to avoid mistakes from accidentally not saving changes. Overall persistence should now be rather simpler. This should open up a possibility for changing the controller to insert more actions into the build graph, to trigger notifcations via the workers.
Diffstat (limited to 'yarns/900-implements.yarn')
-rw-r--r--yarns/900-implements.yarn7
1 files changed, 3 insertions, 4 deletions
diff --git a/yarns/900-implements.yarn b/yarns/900-implements.yarn
index 8a7dff1..4086a2f 100644
--- a/yarns/900-implements.yarn
+++ b/yarns/900-implements.yarn
@@ -161,8 +161,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
IMPLEMENTS THEN the list of builds is (.+)
expected = set(json.loads(get_next_match()))
print('expected', expected)
- body = json.loads(vars['body'])
+ body = json.loads(vars['body'])['builds']
print('body', body)
- actual = set(o['build_id'] for o in body['builds'])
- print('actual', actual)
- assertEqual(actual, expected)
+ builds = set(build['build_id'] for build in body)
+ assertEqual(builds, expected)