Skip to content

Commit 1e7f011

Browse files
committed
improve some assert tests
1 parent 423f990 commit 1e7f011

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

molecule/static-build/prepare.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
dest: /tmp/netdata-kickstart.sh
1111
mode: 0755
1212

13-
- name: "Update apt cache (Debian Family)"
13+
- name: "Update apt cache"
1414
ansible.builtin.apt:
1515
update_cache: true
1616
cache_valid_time: 3600

tasks/assert.yml

+2
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@
3535
that:
3636
- netdata_agent_channel is defined
3737
- netdata_agent_channel is string
38+
- netdata_agent_channel in ['stable', 'edge']
3839
quiet: true
3940

4041
- name: "Test if netdata_agent_state is set correctly"
4142
ansible.builtin.assert:
4243
that:
4344
- netdata_agent_state is defined
4445
- netdata_agent_state is string
46+
- netdata_agent_state in ['present', 'absent']
4547
quiet: true
4648

4749
- name: "Test if netdata_agent_conf_template is set correctly"

tasks/repo-Debian.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- netdata-repo-edge
88
state: absent
99
purge: true
10-
notify: "Update apt cache (Debian Family)"
10+
notify: "Update apt cache"
1111

1212
- name: "Ensure python3-debian and gnupg is installed (Debian Family)"
1313
ansible.builtin.apt:
@@ -47,7 +47,7 @@
4747

4848
- name: "Add netdata repository"
4949
when: netdata_agent_state == "present"
50-
notify: "Update apt cache (Debian Family)"
50+
notify: "Update apt cache"
5151
block:
5252
- name: "Ensure netdata repository is configured (Debian Family): {{ netdata_agent_channel }}"
5353
ansible.builtin.deb822_repository:
@@ -70,7 +70,7 @@
7070

7171
- name: "Remove netdata repository"
7272
when: netdata_agent_state == "absent"
73-
notify: "Update apt cache (Debian Family)"
73+
notify: "Update apt cache"
7474
block:
7575
- name: "Ensure netdata repository is removed (Debian Family): {{ netdata_agent_channel }}"
7676
ansible.builtin.deb822_repository:

0 commit comments

Comments
 (0)