Skip to content

Commit

Permalink
Expand reload tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rgc99 committed Jun 26, 2023
1 parent de170fe commit b439e6a
Show file tree
Hide file tree
Showing 4 changed files with 381 additions and 9 deletions.
16 changes: 16 additions & 0 deletions tests/configs/service_reload_1.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# A config with one of everything; controllers, zones, schedules, sequences
irrigation_unlimited:
granularity: 10
refresh_interval: 2000
Expand All @@ -16,10 +17,25 @@ irrigation_unlimited:
- { t: "2021-01-04 06:05:00", c: 1, z: 1, s: 1 }
- { t: "2021-01-04 06:15:00", c: 1, z: 1, s: 0 }
- { t: "2021-01-04 06:15:00", c: 1, z: 0, s: 0 }
- name: "2-Reload sequence"
start: "2021-01-04 07:00"
end: "2021-01-04 08:00"
results:
- {t: '2021-01-04 07:05:00', c: 1, z: 0, s: 1}
- {t: '2021-01-04 07:05:00', c: 1, z: 1, s: 1}
- {t: '2021-01-04 07:15:00', c: 1, z: 1, s: 0}
- {t: '2021-01-04 07:15:00', c: 1, z: 0, s: 0}
controllers:
- name: "Contoller 1"
zones:
- name: "C1-Z1"
schedules:
- time: "06:05"
duration: "00:10"
sequences:
- name: "C1-S1"
schedules:
- time: "07:05"
zones:
- zone_id: 1
duration: "00:10"
89 changes: 88 additions & 1 deletion tests/configs/service_reload_2.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# A config with two of everything; controllers, zones, schedules, sequences
irrigation_unlimited:
granularity: 10
refresh_interval: 2000
Expand All @@ -10,7 +11,7 @@ irrigation_unlimited:
times:
- name: '1-Reload'
start: '2021-01-04 06:00'
end: '2021-01-04 07:00'
end: '2021-01-04 08:00'
results:
- {t: '2021-01-04 06:05:00', c: 1, z: 0, s: 1}
- {t: '2021-01-04 06:05:00', c: 1, z: 1, s: 1}
Expand All @@ -24,24 +25,110 @@ irrigation_unlimited:
- {t: '2021-01-04 06:20:00', c: 2, z: 1, s: 0}
- {t: '2021-01-04 06:25:00', c: 2, z: 2, s: 0}
- {t: '2021-01-04 06:25:00', c: 2, z: 0, s: 0}
- {t: '2021-01-04 07:05:00', c: 1, z: 0, s: 1}
- {t: '2021-01-04 07:05:00', c: 1, z: 1, s: 1}
- {t: '2021-01-04 07:10:00', c: 1, z: 2, s: 1}
- {t: '2021-01-04 07:10:00', c: 2, z: 0, s: 1}
- {t: '2021-01-04 07:10:00', c: 2, z: 1, s: 1}
- {t: '2021-01-04 07:15:00', c: 1, z: 1, s: 0}
- {t: '2021-01-04 07:15:00', c: 2, z: 2, s: 1}
- {t: '2021-01-04 07:20:00', c: 1, z: 2, s: 0}
- {t: '2021-01-04 07:20:00', c: 1, z: 0, s: 0}
- {t: '2021-01-04 07:20:00', c: 2, z: 1, s: 0}
- {t: '2021-01-04 07:25:00', c: 2, z: 2, s: 0}
- {t: '2021-01-04 07:25:00', c: 2, z: 0, s: 0}
- name: '2-Reload sequences'
start: '2021-01-04 08:00'
end: '2021-01-04 10:00'
results:
- {t: '2021-01-04 08:05:00', c: 1, z: 0, s: 1}
- {t: '2021-01-04 08:05:00', c: 1, z: 1, s: 1}
- {t: '2021-01-04 08:05:00', c: 2, z: 0, s: 1}
- {t: '2021-01-04 08:05:00', c: 2, z: 1, s: 1}
- {t: '2021-01-04 08:15:00', c: 1, z: 2, s: 1}
- {t: '2021-01-04 08:15:00', c: 2, z: 2, s: 1}
- {t: '2021-01-04 08:20:00', c: 1, z: 1, s: 0}
- {t: '2021-01-04 08:20:00', c: 2, z: 1, s: 0}
- {t: '2021-01-04 08:40:00', c: 1, z: 2, s: 0}
- {t: '2021-01-04 08:40:00', c: 1, z: 0, s: 0}
- {t: '2021-01-04 08:40:00', c: 2, z: 2, s: 0}
- {t: '2021-01-04 08:40:00', c: 2, z: 0, s: 0}
- {t: '2021-01-04 09:05:00', c: 1, z: 0, s: 1}
- {t: '2021-01-04 09:05:00', c: 1, z: 1, s: 1}
- {t: '2021-01-04 09:05:00', c: 2, z: 0, s: 1}
- {t: '2021-01-04 09:05:00', c: 2, z: 1, s: 1}
- {t: '2021-01-04 09:15:00', c: 1, z: 2, s: 1}
- {t: '2021-01-04 09:15:00', c: 2, z: 2, s: 1}
- {t: '2021-01-04 09:20:00', c: 1, z: 1, s: 0}
- {t: '2021-01-04 09:25:00', c: 2, z: 1, s: 0}
- {t: '2021-01-04 09:40:00', c: 1, z: 2, s: 0}
- {t: '2021-01-04 09:40:00', c: 1, z: 0, s: 0}
- {t: '2021-01-04 09:45:00', c: 2, z: 2, s: 0}
- {t: '2021-01-04 09:45:00', c: 2, z: 0, s: 0}
controllers:
- name: "Contoller 1"
zones:
- name: "C1-Z1"
schedules:
- time: "06:05"
duration: "00:10"
- time: "07:05"
duration: "00:10"
- name: "C1-Z2"
schedules:
- time: "06:10"
duration: "00:10"
- time: "07:10"
duration: "00:10"
sequences:
- name: "C1-S1"
schedules:
- time: "08:05"
- time: "09:05"
zones:
- zone_id: 1
duration: "00:10"
- zone_id: 2
duration: "00:15"
- name: "C1-S2"
schedules:
- time: "08:10"
- time: "09:10"
zones:
- zone_id: 1
duration: "00:10"
- zone_id: 2
duration: "00:20"
- name: "Controller 2"
zones:
- name: "C2-Z1"
schedules:
- time: "06:10"
duration: "00:10"
- time: "07:10"
duration: "00:10"
- name: "C2-Z2"
schedules:
- time: "06:15"
duration: "00:10"
- time: "07:15"
duration: "00:10"
sequences:
- name: "C2-S1"
schedules:
- time: "08:05"
- time: "09:05"
zones:
- zone_id: 1
duration: "00:10"
- zone_id: 2
duration: "00:15"
- name: "C2-S2"
schedules:
- time: "08:10"
- time: "09:15"
zones:
- zone_id: 1
duration: "00:10"
- zone_id: 2
duration: "00:20"
Loading

0 comments on commit b439e6a

Please sign in to comment.