2020-05-27 22:06:03 +00:00
|
|
|
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
|
2020-05-28 00:12:39 +00:00
|
|
|
verify_response_with:
|
|
|
|
function: validate_controller:multiple
|
2020-05-27 22:06:03 +00:00
|
|
|
save:
|
|
|
|
json:
|
|
|
|
returned_id: "[0].id"
|
2020-05-28 00:12:39 +00:00
|
|
|
returned_relay_count: "[0].relay_count"
|
2020-05-27 22:06:03 +00:00
|
|
|
|
|
|
|
- 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
|
2020-05-28 00:12:39 +00:00
|
|
|
verify_response_with:
|
|
|
|
function: validate_relay:multiple
|
|
|
|
function: validate_relay:relay_count
|
|
|
|
extra_kwargs:
|
|
|
|
relay_count: !int "{returned_relay_count:d}"
|
2020-05-27 22:06:03 +00:00
|
|
|
|
|
|
|
- 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
|
2020-05-28 00:12:39 +00:00
|
|
|
verify_response_with:
|
|
|
|
function: validate_relay:single
|
|
|
|
function: validate_relay:check_controller_id
|
|
|
|
extra_kwargs:
|
|
|
|
name: "{returned_id}"
|
|
|
|
function: validate_relay:check_number
|
|
|
|
extra_kwargs:
|
|
|
|
number: 5
|