core-legacy/tests/tavern_tests/controller_relays_basic.tavern.yaml

140 lines
3.3 KiB
YAML
Raw Normal View History

test_name: Test basic controller relays functions
stages:
- name: "[controller_relays_basic] discover controllers"
request:
method: POST
url: "http://localhost:5000/api/v1/controllers/discover/"
response:
status_code: 200
json:
- id: !anystr
name: !anystr
relay_count: !anyint
relays: !anystr
active: !anybool
port: !anyint
ip: !anystr
relays: !anylist
save:
json:
returned_id: "[0].id"
- name: "[controller_relays_basic] get controller relays, check length"
request:
method: GET
url: "http://localhost:5000/api/v1/controllers/{returned_id}/relays"
response:
status_code: 200
json:
- name: !anystr
number: 0
controller_id: "{returned_id}"
active_schedule:
id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
schedules: !anylist
tags: !anylist
- name: !anystr
number: 1
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 2
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 3
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 4
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 5
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 6
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 7
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 8
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: !anystr
number: 9
controller_id: "{returned_id}"
active_schedule: !anydict
schedules: !anylist
tags: !anylist
- name: "[controller_relays_basic] get controller relays, check length"
request:
method: GET
url: "http://localhost:5000/api/v1/controllers/{returned_id}/relays/5"
response:
status_code: 200
json:
name: !anystr
number: 5
controller_id: "{returned_id}"
active_schedule:
id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
schedules:
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
- id: !anystr
name: !anystr
periods: !anylist
tags: !anylist
tags: !anylist