Skip to content

Commit

Permalink
Add regression test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihlus committed Jan 17, 2025
1 parent c1ac3ab commit 632f561
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/ansible/regression/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- import_playbook: issue_591__setuptools_cwd_crash.yml
- import_playbook: issue_615__streaming_transfer.yml
- import_playbook: issue_655__wait_for_connection_error.yml
- import_playbook: issue_766__get_with_context.yml
- import_playbook: issue_776__load_plugins_called_twice.yml
- import_playbook: issue_952__ask_become_pass.yml
- import_playbook: issue_1066__add_host__host_key_checking.yml
Expand Down
38 changes: 38 additions & 0 deletions tests/ansible/regression/issue_766__get_with_context.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- name: Get running configuration and state data
hosts: localhost
gather_facts: true
tasks:
- block:
- name: Start container
delegate_to: localhost
vars:
ansible_port: 8040
containers.podman.podman_container:
name: sysprep
image: ghcr.io/mitogen-hq/sysrepo-netopeer2:latest
auto_remove: true
detach: true
recreate: true
published_ports:
- "{{ ansible_port }}:830"

- name: Wait for container
delegate_to: localhost
# TODO robust condition. wait_for + search_regex? wait_for_connection?
wait_for:
timeout: 5

- name: Get running configuration and state data
vars:
ansible_port: 8040
ansible_connection: netconf
ansible_user: netconf
ansible_password: netconf
ansible.netcommon.netconf_get:

always:
- name: Cleanup container
delegate_to: localhost
containers.podman.podman_container:
name: sysprep
state: absent

0 comments on commit 632f561

Please sign in to comment.