Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable http server at the end of eos_eapi tests #217

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelogs/fragments/cleanup_eapi_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
minor_changes:
- Enable http port at the end of eos_eapi integration tests.
25 changes: 24 additions & 1 deletion tests/integration/targets/eos_eapi/tests/cli/configure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
- show management api http-commands | json
provider: '{{ cli }}'

- name: Expect endpoint ports to be set
- name: Expect http port to remain as 80 and not change to 81 ( with http disabled )
assert:
that:
- http_config.stdout[0].httpServer.port == 80

- name: Expect endpoint other ports to be set as configured
assert:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know that there is much value in breaking this down into two separate assert statements. A longer name or even just a comment before the assert task would be fine for me

that:
- http_config.stdout[0].httpsServer.port == 4443
- http_config.stdout[0].localHttpServer.port == 8181

Expand All @@ -41,4 +45,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"