summaryrefslogtreecommitdiff
path: root/test/integration/targets/apt_repository/tasks/apt.yml
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/apt_repository/tasks/apt.yml')
-rw-r--r--test/integration/targets/apt_repository/tasks/apt.yml18
1 files changed, 17 insertions, 1 deletions
diff --git a/test/integration/targets/apt_repository/tasks/apt.yml b/test/integration/targets/apt_repository/tasks/apt.yml
index 9c15e647..2ddf4140 100644
--- a/test/integration/targets/apt_repository/tasks/apt.yml
+++ b/test/integration/targets/apt_repository/tasks/apt.yml
@@ -152,6 +152,11 @@
- 'result.changed'
- 'result.state == "present"'
- 'result.repo == test_ppa_spec'
+ - '"sources_added" in result'
+ - 'result.sources_added | length == 1'
+ - '"git" in result.sources_added[0]'
+ - '"sources_removed" in result'
+ - 'result.sources_removed | length == 0'
- result_cache is not changed
- name: 'examine apt cache mtime'
@@ -167,6 +172,17 @@
apt_repository: repo='{{test_ppa_spec}}' state=absent
register: result
+- assert:
+ that:
+ - 'result.changed'
+ - 'result.state == "absent"'
+ - 'result.repo == test_ppa_spec'
+ - '"sources_added" in result'
+ - 'result.sources_added | length == 0'
+ - '"sources_removed" in result'
+ - 'result.sources_removed | length == 1'
+ - '"git" in result.sources_removed[0]'
+
# When installing a repo with the spec, the key is *NOT* added
- name: 'ensure ppa key is absent (expect: pass)'
apt_key: id='{{test_ppa_key}}' state=absent
@@ -224,7 +240,7 @@
- assert:
that:
- result is failed
- - result.msg == 'Please set argument \'repo\' to a non-empty value'
+ - result.msg.startswith("argument 'repo' is of type <class 'NoneType'> and we were unable to convert to str")
- name: Test apt_repository with an empty value for repo
apt_repository: