From 4b014bcb1522f8931b2a5bd6085086262ada35cf Mon Sep 17 00:00:00 2001 From: nqb Date: Tue, 26 Oct 2021 11:49:01 +0200 Subject: [PATCH] fix(tests): typo in assertions Related to #6647 --- .../check_dot1x_int_status.yml | 22 +++++++++++++++++++ .../wired_dot1x_eap_tls/#wired_dot1x_eap_tls# | 22 +++++++++++++++++++ .../check_dot1x_int_status.yml | 22 +++++++++++++++++++ .../65_check_dot1x_int_status.yml | 2 +- .../98_check_dot1x_int_status.yml | 2 +- 5 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 t/venom/switches/wired_dot1x_eap_peap/check_dot1x_int_status.yml create mode 100644 t/venom/switches/wired_dot1x_eap_tls/#wired_dot1x_eap_tls# create mode 100644 t/venom/switches/wired_dot1x_eap_tls/check_dot1x_int_status.yml diff --git a/t/venom/switches/wired_dot1x_eap_peap/check_dot1x_int_status.yml b/t/venom/switches/wired_dot1x_eap_peap/check_dot1x_int_status.yml new file mode 100644 index 000000000000..aaa106976887 --- /dev/null +++ b/t/venom/switches/wired_dot1x_eap_peap/check_dot1x_int_status.yml @@ -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 diff --git a/t/venom/switches/wired_dot1x_eap_tls/#wired_dot1x_eap_tls# b/t/venom/switches/wired_dot1x_eap_tls/#wired_dot1x_eap_tls# new file mode 100644 index 000000000000..edad1c754b93 --- /dev/null +++ b/t/venom/switches/wired_dot1x_eap_tls/#wired_dot1x_eap_tls# @@ -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 diff --git a/t/venom/switches/wired_dot1x_eap_tls/check_dot1x_int_status.yml b/t/venom/switches/wired_dot1x_eap_tls/check_dot1x_int_status.yml new file mode 100644 index 000000000000..edad1c754b93 --- /dev/null +++ b/t/venom/switches/wired_dot1x_eap_tls/check_dot1x_int_status.yml @@ -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 diff --git a/t/venom/test_suites/wired_dot1x_eap_peap/65_check_dot1x_int_status.yml b/t/venom/test_suites/wired_dot1x_eap_peap/65_check_dot1x_int_status.yml index 224ebd0ae2a3..e66ef14045d8 120000 --- a/t/venom/test_suites/wired_dot1x_eap_peap/65_check_dot1x_int_status.yml +++ b/t/venom/test_suites/wired_dot1x_eap_peap/65_check_dot1x_int_status.yml @@ -1 +1 @@ -../../switches/common/check_dot1x_int_status.yml \ No newline at end of file +../../switches/wired_dot1x_eap_peap/check_dot1x_int_status.yml \ No newline at end of file diff --git a/t/venom/test_suites/wired_dot1x_eap_tls_manual/98_check_dot1x_int_status.yml b/t/venom/test_suites/wired_dot1x_eap_tls_manual/98_check_dot1x_int_status.yml index 224ebd0ae2a3..a5c1d560cc34 120000 --- a/t/venom/test_suites/wired_dot1x_eap_tls_manual/98_check_dot1x_int_status.yml +++ b/t/venom/test_suites/wired_dot1x_eap_tls_manual/98_check_dot1x_int_status.yml @@ -1 +1 @@ -../../switches/common/check_dot1x_int_status.yml \ No newline at end of file +../../switches/wired_dot1x_eap_tls/check_dot1x_int_status.yml \ No newline at end of file