File: remove_tmp_path.yml

package info (click to toggle)
python-mitogen 0.3.36-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,708 kB
  • sloc: python: 24,457; sh: 198; makefile: 74; perl: 19; ansic: 18
file content (43 lines) | stat: -rw-r--r-- 902 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# Ensure _remove_tmp_path cleans up the temporary path.
#
#
- name: integration/action/remove_tmp_path.yml
  hosts: test-targets
  tasks:
    #
    # Use the copy module to cause a temporary directory to be created, and
    # return a result with a 'src' attribute pointing into that directory.
    #

    - name: Ensure remove_tmp_path_test
      copy:
        dest: /tmp/remove_tmp_path_test
        content: "{{ 123123 | random }}"
      register: out

    - stat:
        path: "{{out.src}}"
      register: out2

    - assert:
        that:
        - not out2.stat.exists
        fail_msg: |
          out={{ out }}

    - stat:
        path: "{{out.src|dirname}}"
      register: out2

    - assert:
        that:
        - not out2.stat.exists
        fail_msg: |
          out={{ out }}

    - file:
        path: /tmp/remove_tmp_path_test
        state: absent
  tags:
    - remove_tmp_path