# tests-node3_light.tavern.yaml
---

test_name: Test mqtt message - std light enum

includes:
  - !include common.yaml

paho-mqtt: &mqtt_spec
  client:
    transport: tcp
    client_id: tavern-tester
  connect:
    host: "{mqtt_host:s}"
    port: !int "{mqtt_port:d}"
    timeout: 5

#node3 - std microrisc light template
stages:
  - name: light enum
    max_retries: 1
    mqtt_publish:
      topic: Iqrf/DpaRequest
      json: !include messages/node3/iqrfLight_Enumerate-request-1-0-0.yaml

    mqtt_response:
      topic: Iqrf/DpaResponse
      json: !include messages/node3/iqrfLight_Enumerate-response-1-0-0.yaml
      timeout: 5

  - name: light set power
    max_retries: 1
    mqtt_publish:
      topic: Iqrf/DpaRequest
      json: !include messages/node3/iqrfLight_SetPower-request-1-0-0.yaml

    mqtt_response:
      topic: Iqrf/DpaResponse
      json: !include messages/node3/iqrfLight_SetPower-response-1-0-0.yaml
      timeout: 5

  - name: light decrement power
    max_retries: 1
    mqtt_publish:
      topic: Iqrf/DpaRequest
      json: !include messages/node3/iqrfLight_DecrementPower-request-1-0-0.yaml

    mqtt_response:
      topic: Iqrf/DpaResponse
      json: !include messages/node3/iqrfLight_DecrementPower-response-1-0-0.yaml
      timeout: 5

  - name: light increment power
    max_retries: 1
    mqtt_publish:
      topic: Iqrf/DpaRequest
      json: !include messages/node3/iqrfLight_IncrementPower-request-1-0-0.yaml

    mqtt_response:
      topic: Iqrf/DpaResponse
      json: !include messages/node3/iqrfLight_IncrementPower-response-1-0-0.yaml
      timeout: 5
