Skip to content

Commit

Permalink
Fix nxos_facts integration test (#917)
Browse files Browse the repository at this point in the history
* Add/Test Integration

* test - 2

* fix facts tests and changes in integation

* fix

* remove file_copy ignore

* file copy fix

* fixes fstring error

* added changelog

* file copy

* remove vpc


merging this with upstream ci fail as these are related to cml
  • Loading branch information
roverflow authored Jan 9, 2025
1 parent 069ea16 commit 4c1d844
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelogs/fragments/tests_fix.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bugfixes:
- Fixes mixed usage of f-string and format string in action plugin for consistency.
trivial:
- Added tests fixes for nxos_facts.
3 changes: 1 addition & 2 deletions plugins/action/nxos.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ def run(self, tmp=None, task_vars=None):
"msg": (
f"Connection type must be fully qualified name for "
f"network_cli connection type, got {self._play_context.connection}"
)
% self._play_context.connection,
),
}

conn = Connection(self._connection.socket_path)
Expand Down
2 changes: 2 additions & 0 deletions tests/integration/targets/nxos_facts/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ available_network_resources:
- static_routes
- telemetry
- vlans
- vrf_address_family
- vrf_global
- vrf_interfaces
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

- ansible.builtin.assert:
that:
- result is search("argument 'file_pull_timeout' is of type .* and we were unable to convert to int")
- result.msg is ansible.builtin.search("argument 'file_pull_timeout' is of type .* and we were unable to convert to int", multiline=true)

- name: Input validation - param should be type <bool>
register: result
Expand Down

0 comments on commit 4c1d844

Please sign in to comment.