Skip to content

Commit

Permalink
fix(tests): typo in assertions
Browse files Browse the repository at this point in the history
Related to #6647
  • Loading branch information
nqb committed Oct 26, 2021
1 parent 41ea5bc commit 4b014bc
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 2 deletions.
22 changes: 22 additions & 0 deletions t/venom/switches/wired_dot1x_eap_peap/check_dot1x_int_status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check dot1x interface status on switch01
testcases:
- name: check_dot1x_int_status_on_switch01
steps:
- type: http
method: POST
basic_auth_user: "{{.switch01.api.user}}"
basic_auth_password: "{{.switch01.api.password}}"
url: '{{.switch01.api.url}}/nclu/v1/rpc'
ignore_verify_ssl: true
body: >-
{
"cmd": "show dot1x interface {{.switch01.dot1x_interface.id}} json"
}
headers:
"Content-Type": "application/json"
assertions:
# we didn't check MAC address on port to make this testcase reusable
- result.body ShouldContainSubstring "{{.dot1x_eap_peap.roles.ad_user.vlan_id}}"
- result.body ShouldContainSubstring PEAP
- result.body ShouldContainSubstring AUTHORIZED
- result.statuscode ShouldEqual 200
22 changes: 22 additions & 0 deletions t/venom/switches/wired_dot1x_eap_tls/#wired_dot1x_eap_tls#
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check dot1x interface status on switch01
testcases:
- name: check_dot1x_int_status_on_switch01
steps:
- type: http
method: POST
basic_auth_user: "{{.switch01.api.user}}"
basic_auth_password: "{{.switch01.api.password}}"
url: '{{.switch01.api.url}}/nclu/v1/rpc'
ignore_verify_ssl: true
body: >-
{
"cmd": "show dot1x interface {{.switch01.dot1x_interface.id}} json"
}
headers:
"Content-Type": "application/json"
assertions:
# we didn't check MAC address on port to make this testcase reusable
- result.body ShouldContainSubstring "{{.wired_dot1x_eap_tls_manual.roles.dot1x_eap_tls.vlan_id}}"
- result.body ShouldContainSubstring TLS
- result.body ShouldContainSubstring AUTHORIZED
- result.statuscode ShouldEqual 200
22 changes: 22 additions & 0 deletions t/venom/switches/wired_dot1x_eap_tls/check_dot1x_int_status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check dot1x interface status on switch01
testcases:
- name: check_dot1x_int_status_on_switch01
steps:
- type: http
method: POST
basic_auth_user: "{{.switch01.api.user}}"
basic_auth_password: "{{.switch01.api.password}}"
url: '{{.switch01.api.url}}/nclu/v1/rpc'
ignore_verify_ssl: true
body: >-
{
"cmd": "show dot1x interface {{.switch01.dot1x_interface.id}} json"
}
headers:
"Content-Type": "application/json"
assertions:
# we didn't check MAC address on port to make this testcase reusable
- result.body ShouldContainSubstring "{{.wired_dot1x_eap_tls_manual.roles.dot1x_eap_tls.vlan_id}}"
- result.body ShouldContainSubstring TLS
- result.body ShouldContainSubstring AUTHORIZED
- result.statuscode ShouldEqual 200

0 comments on commit 4b014bc

Please sign in to comment.