summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahmanim Benny <brahmani@redhat.com>2024-03-05 12:16:03 +0200
committerGitHub <noreply@github.com>2024-03-05 15:46:03 +0530
commit21e3948bddf9dd39339bda6a8d655919a5ee8ca6 (patch)
treeb9dffc3308c85507308a02861271ee29b24cf0a0
parentb2dd05465b80e666c957ebc857b875f8681699e8 (diff)
downloadvyos.vyos-21e3948bddf9dd39339bda6a8d655919a5ee8ca6.tar.gz
vyos.vyos-21e3948bddf9dd39339bda6a8d655919a5ee8ca6.zip
Avoid unsafe conditions for integration tests (#340)
* Avoid unsafe conditions for integration tests * Remove .idea/ folder * remove another jinja templating expression from asserts condition * remove shortname jinja templating expression from asserts condition * Update changelog * changelog updates
-rw-r--r--changelogs/fragments/avoid_unsafe_conditions.yml3
-rw-r--r--tests/integration/targets/vyos_config/tests/cli/check_config.yaml4
-rw-r--r--tests/integration/targets/vyos_config/tests/redirection/cli/shortname.yaml4
3 files changed, 7 insertions, 4 deletions
diff --git a/changelogs/fragments/avoid_unsafe_conditions.yml b/changelogs/fragments/avoid_unsafe_conditions.yml
new file mode 100644
index 0000000..693f01d
--- /dev/null
+++ b/changelogs/fragments/avoid_unsafe_conditions.yml
@@ -0,0 +1,3 @@
+---
+trivial:
+ - avoid_unsafe_conditions - Avoid unsafe conditions in integration tests to resolve issues related to assertion unsafe conditions.
diff --git a/tests/integration/targets/vyos_config/tests/cli/check_config.yaml b/tests/integration/targets/vyos_config/tests/cli/check_config.yaml
index 2df0135..5e02854 100644
--- a/tests/integration/targets/vyos_config/tests/cli/check_config.yaml
+++ b/tests/integration/targets/vyos_config/tests/cli/check_config.yaml
@@ -16,7 +16,7 @@
- name: Check that multiple duplicate lines collapse into a single commands
assert:
that:
- - "{{ result.commands|length }} == 1"
+ - result.commands|length == 1
- name: Check that set is correctly prepended
assert:
@@ -52,6 +52,6 @@
- assert:
that:
- - "{{ result.filtered|length }} == 2"
+ - result.filtered|length == 2
- debug: msg="END cli/config_check.yaml on connection={{ ansible_connection }}"
diff --git a/tests/integration/targets/vyos_config/tests/redirection/cli/shortname.yaml b/tests/integration/targets/vyos_config/tests/redirection/cli/shortname.yaml
index f397a27..e5bb8dd 100644
--- a/tests/integration/targets/vyos_config/tests/redirection/cli/shortname.yaml
+++ b/tests/integration/targets/vyos_config/tests/redirection/cli/shortname.yaml
@@ -16,7 +16,7 @@
- name: Check that multiple duplicate lines collapse into a single commands
assert:
that:
- - "{{ result.commands|length }} == 1"
+ - result.commands|length == 1
- name: Check that set is correctly prepended
assert:
@@ -52,7 +52,7 @@
- assert:
that:
- - "{{ result.filtered|length }} == 2"
+ - result.filtered|length == 2
- name: Remove interface description and delete temp user
vyos.vyos.config: &cleanup