summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/dnf/tasks/cacheonly.yml
blob: eb19156cc4d1fff66f80c70028406a8990f1326c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
---
- name: Test cacheonly (clean before testing)
  command: dnf clean all

- name: Try installing from cache where it has been cleaned
  dnf:
    name: sos
    state: latest
    cacheonly: true
  register: dnf_result
  ignore_errors: true

- name: Verify dnf failed or has not changed
  assert:
    that:
      - "dnf_result is failed or not dnf_result is changed"