From 358e63232fc35b176ebd67d01dc576811500c2ae Mon Sep 17 00:00:00 2001 From: Mike Wiebe Date: Tue, 6 Feb 2018 02:22:42 -0500 Subject: [PATCH] Minor updates to nxos_nxapi tests (#35750) * Minor updates to nxos_nxapi tests * Fixed duplicate yaml key issue * Make rubocop happy --- .../nxos_nxapi/tasks/platform/n5k/assert_changes.yaml | 6 ++++++ .../integration/targets/nxos_nxapi/tests/cli/configure.yaml | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes.yaml diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes.yaml new file mode 100644 index 00000000000..ec66efd0ac4 --- /dev/null +++ b/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes.yaml @@ -0,0 +1,6 @@ +--- +- name: Assert configuration changes + assert: + that: + - result.stdout[0].http_port is not defined + - result.stdout[0].https_port|string is search("9443") diff --git a/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml b/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml index 6e8b4befce0..8adb977883b 100644 --- a/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml +++ b/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml @@ -27,8 +27,11 @@ - include: targets/nxos_nxapi/tasks/platform/n7k/assert_changes.yaml when: platform is match('N7K') +- include: targets/nxos_nxapi/tasks/platform/n5k/assert_changes.yaml + when: platform is match('N5K') + - include: targets/nxos_nxapi/tasks/platform/default/assert_changes.yaml - when: not ( platform is search('N7K')) + when: not ( platform is search('N7K')) and not (platform is search('N5K')) and not (platform is search('N35')) - name: Configure NXAPI again nxos_nxapi: