mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-27 13:16:45 +00:00
Add mqtt username and password to tests
This commit is contained in:
parent
80052140f3
commit
51c97f16d9
@ -1,10 +1,11 @@
|
||||
# config.yaml
|
||||
---
|
||||
|
||||
name: Common test information
|
||||
description: Connection information for MQTT Client
|
||||
|
||||
variables:
|
||||
host: 10.4.0.5
|
||||
host: homeassistant.local
|
||||
username: hasp
|
||||
password: hasp
|
||||
port: 1883
|
||||
plate: plate35
|
@ -13,6 +13,9 @@ paho-mqtt:
|
||||
host: "{host}"
|
||||
port: !int "{port:d}"
|
||||
timeout: 3
|
||||
auth:
|
||||
username: "{username}"
|
||||
password: "{password}"
|
||||
|
||||
marks:
|
||||
- parametrize:
|
||||
|
@ -13,6 +13,9 @@ paho-mqtt: &mqtt_spec
|
||||
host: "{host}"
|
||||
port: !int "{port:d}"
|
||||
timeout: 1
|
||||
auth:
|
||||
username: "{username}"
|
||||
password: "{password}"
|
||||
|
||||
stages:
|
||||
- name: Page 1
|
||||
|
@ -1,6 +1,5 @@
|
||||
# test_page.tavern.yaml
|
||||
---
|
||||
|
||||
test_name: Page command
|
||||
|
||||
includes:
|
||||
@ -14,6 +13,9 @@ paho-mqtt:
|
||||
host: "{host}"
|
||||
port: !int "{port:d}"
|
||||
timeout: 3
|
||||
auth:
|
||||
username: "{username}"
|
||||
password: "{password}"
|
||||
|
||||
stages:
|
||||
- name: step 1 - Page test
|
||||
@ -46,7 +48,7 @@ stages:
|
||||
- name: step 4 - Page test
|
||||
mqtt_publish:
|
||||
topic: hasp/{plate}/command/json
|
||||
payload: "[\"page=1\"]"
|
||||
payload: '["page=1"]'
|
||||
mqtt_response:
|
||||
topic: hasp/{plate}/state/page
|
||||
payload: "1"
|
||||
@ -55,7 +57,7 @@ stages:
|
||||
- name: step 5 - Page test
|
||||
mqtt_publish:
|
||||
topic: hasp/{plate}/command/json
|
||||
payload: "[\"page 300\"]"
|
||||
payload: '["page 300"]'
|
||||
mqtt_response:
|
||||
topic: hasp/{plate}/state/page
|
||||
payload: "1"
|
||||
|
@ -13,6 +13,9 @@ paho-mqtt:
|
||||
host: "{host}"
|
||||
port: !int "{port:d}"
|
||||
timeout: 3
|
||||
auth:
|
||||
username: "{username}"
|
||||
password: "{password}"
|
||||
|
||||
marks:
|
||||
- parametrize:
|
||||
@ -52,8 +55,30 @@ marks:
|
||||
vals:
|
||||
- [1, 0, 120, 121, 122, 123, 0, 255, "I'm sorry.", "louie"]
|
||||
- [1, 0, -10, -10, 256, 257, 1, 64, "louie", " The cat stretched."]
|
||||
- [0, 1, 1024, 1025, 1026, 1027, 5, 0, "The pipe began to rust while new.", ""]
|
||||
- [0, 1, 80, 81, 82, 83, 32535, 192, "" ," Oak is strong and also gives shade."]
|
||||
- [
|
||||
0,
|
||||
1,
|
||||
1024,
|
||||
1025,
|
||||
1026,
|
||||
1027,
|
||||
5,
|
||||
0,
|
||||
"The pipe began to rust while new.",
|
||||
"",
|
||||
]
|
||||
- [
|
||||
0,
|
||||
1,
|
||||
80,
|
||||
81,
|
||||
82,
|
||||
83,
|
||||
32535,
|
||||
192,
|
||||
"",
|
||||
" Oak is strong and also gives shade.",
|
||||
]
|
||||
|
||||
stages:
|
||||
- name: Page 1
|
||||
|
@ -1,6 +1,5 @@
|
||||
# test_value_str.tavern.yaml
|
||||
---
|
||||
|
||||
test_name: Obj Standard Properties
|
||||
|
||||
includes:
|
||||
@ -14,6 +13,9 @@ paho-mqtt:
|
||||
host: "{host}"
|
||||
port: !int "{port:d}"
|
||||
timeout: 3
|
||||
auth:
|
||||
username: "{username}"
|
||||
password: "{password}"
|
||||
|
||||
marks:
|
||||
- parametrize:
|
||||
@ -26,14 +28,14 @@ marks:
|
||||
- 30
|
||||
- 31
|
||||
- 32
|
||||
# - 33
|
||||
# - 40
|
||||
# - 33
|
||||
# - 40
|
||||
- 41
|
||||
- 50
|
||||
- 51
|
||||
- 91
|
||||
# - 90
|
||||
# - 1
|
||||
# - 90
|
||||
# - 1
|
||||
- 2
|
||||
- 71
|
||||
- 80
|
||||
|
Loading…
x
Reference in New Issue
Block a user