test asserts: Clarify name

This commit is contained in:
Till Maas 2019-01-08 16:22:22 +01:00
parent b144a026b4
commit 9b3712cbdf
4 changed files with 8 additions and 5 deletions

View file

@ -1,7 +1,9 @@
# SPDX-License-Identifier: BSD-3-Clause
---
# need to run setup again when this is just a task to ensure ansible_interfaces
# is current
- setup:
- name: "assert that {{ interface }} is absent"
- name: "assert that interface {{ interface }} is absent"
assert:
that: "{{ not interface in ansible_interfaces }}"
msg: "{{ interface }} is in ansible_interfaces: {{ ansible_interfaces }}"

View file

@ -1,8 +1,9 @@
# SPDX-License-Identifier: BSD-3-Clause
---
# need to run setup again when this is just a task to make sure ansible_interfaces is correct
# need to run setup again when this is just a task to ensure ansible_interfaces
# is current
- setup:
- name: "assert that {{ interface }} is present"
- name: "assert that interface {{ interface }} is present"
assert:
that: "{{ interface in ansible_interfaces }}"
msg: "{{ interface }} is not in ansible_interfaces: {{ ansible_interfaces }}"

View file

@ -8,7 +8,7 @@
path: "{{ profile_path }}"
register: profile_stat
- name: "assert that {{ profile }} is absent"
- name: "assert that profile '{{ profile }}' is absent"
assert:
that: not profile_stat.stat.exists
msg: "profile {{ profile_path }} does exist"

View file

@ -8,7 +8,7 @@
path: "{{ profile_path }}"
register: profile_stat
- name: "assert that {{ profile }} is present"
- name: "assert that profile '{{ profile }}' is present"
assert:
that: profile_stat.stat.exists
msg: "profile {{ profile_path }} does not exist"