diff --git a/changelogs/fragments/cleanup_eapi_tests.yaml b/changelogs/fragments/cleanup_eapi_tests.yaml new file mode 100644 index 000000000..6b5e7c256 --- /dev/null +++ b/changelogs/fragments/cleanup_eapi_tests.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: + - Enable http port at the end of eos_eapi integration tests. diff --git a/tests/integration/targets/eos_eapi/tests/cli/configure.yaml b/tests/integration/targets/eos_eapi/tests/cli/configure.yaml index 868aee05e..8c3b3aeba 100644 --- a/tests/integration/targets/eos_eapi/tests/cli/configure.yaml +++ b/tests/integration/targets/eos_eapi/tests/cli/configure.yaml @@ -19,7 +19,7 @@ - show management api http-commands | json provider: '{{ cli }}' -- name: Expect endpoint ports to be set +- name: Expect endpoint ports to be set as configured ( with http disabled, http server port is not affected ). assert: that: - http_config.stdout[0].httpServer.port == 80 @@ -41,4 +41,23 @@ that: - eos_eapi_output.changed == false +- name: Enable http server + become: true + arista.eos.eos_eapi: + enable_http: true + http_port: 80 + +- register: http_config + arista.eos.eos_command: + commands: + - show management api http-commands | json + provider: '{{ cli }}' + + +- name: Expect http server to be in enabled state + assert: + that: + - http_config.stdout[0].httpServer.running == true + + - debug: msg="END CLI/CONFIGURE.YAML"