-
Notifications
You must be signed in to change notification settings - Fork 56
/
rides-and-relocations.test.flow.yaml
53 lines (51 loc) · 1.84 KB
/
rides-and-relocations.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
import:
- rides-and-relocations.flow.yaml
tests:
examples/citi-bike/test/connected-rides:
- ingest:
description: Bike goes from station 1 => 2 => 3 => 4.
collection: examples/citi-bike/rides
documents:
- &ride1
bike_id: &bike 17558
begin: &station1
station: { id: 3276, name: "Marin Light Rail" }
timestamp: "2020-09-01 09:21:12.3090"
end: &station2
station: { id: 3639, name: "Harborside" }
timestamp: "2020-09-01 13:48:12.3830"
- &ride2
bike_id: *bike
begin: *station2
end: &station3
station: { id: 3202, name: "Newport PATH" }
timestamp: "2020-09-01 14:33:35.1020"
- &ride3
bike_id: *bike
begin: *station3
end: &station4
station: { id: 3267, name: "Morris Canal" }
timestamp: "2020-09-01 16:49:30.1610"
- verify:
description: Expect the connected sequence didn't produce a relocation event.
collection: examples/citi-bike/rides-and-relocations
documents: [*ride1, *ride2, *ride3]
examples/citi-bike/test/disconnected-rides:
- ingest:
description: Bike goes from station 1 => 2, then 3 => 4.
collection: examples/citi-bike/rides
documents:
- &ride1 { bike_id: *bike, begin: *station1, end: *station2 }
- &ride2 { bike_id: *bike, begin: *station3, end: *station4 }
- verify:
description: Expect the disconnected sequence produced a relocation.
collection: examples/citi-bike/rides-and-relocations
documents:
- *ride1
- {
bike_id: *bike,
begin: *station2,
end: *station3,
relocation: true,
}
- *ride2