-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathstations.test.flow.yaml
72 lines (67 loc) · 2.29 KB
/
stations.test.flow.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import:
- stations.flow.yaml
tests:
examples/citi-bike/test/station-updates:
- ingest:
description: Two bikes leave (from Marin & Newport) and arrive at Harborside.
collection: examples/citi-bike/rides
documents:
- bike_id: &bikeA 8675
begin:
station: &Marin { id: 3276, name: "Marin Light Rail" }
timestamp: &ts1 "2020-09-01T09:21:12.3090Z"
end:
station: &Harborside { id: 3639, name: "Harborside" }
timestamp: &ts2 "2020-09-01T13:48:12.3830Z"
- bike_id: &bikeB 17558
begin:
station: &Newport { id: 3202, name: "Newport PATH" }
timestamp: *ts1
end:
station: *Harborside
timestamp: *ts2
- verify:
description: Expect stations reflect the trips.
collection: examples/citi-bike/stations
documents:
- <<: *Newport
departure: { ride: 1 }
- <<: *Marin
departure: { ride: 1 }
- <<: *Harborside
arrival: { ride: 2 }
stable: { add: [*bikeA, *bikeB] }
- ingest:
description: Bike A rides to Marin. Bike B is relocated, and rides from Marin to Newport.
collection: examples/citi-bike/rides
documents:
- bike_id: *bikeA
begin:
station: *Harborside
timestamp: &ts3 "2020-09-01T14:33:35.1020Z"
end:
station: *Marin
timestamp: &ts4 "2020-09-01T16:49:30.1610Z"
- bike_id: *bikeB
begin:
station: *Marin
timestamp: *ts3
end:
station: *Newport
timestamp: *ts4
- verify:
description: Expect stations reflect the additional ride and relocation.
collection: examples/citi-bike/stations
documents:
- <<: *Newport
arrival: { ride: 1 }
departure: { ride: 1 }
stable: { add: [*bikeB] }
- <<: *Marin
arrival: { ride: 1, move: 1 }
departure: { ride: 2 }
stable: { add: [*bikeA] }
- <<: *Harborside
arrival: { ride: 2 }
departure: { ride: 1, move: 1 }
stable: { add: [] }