File: transfer_data.yml

package info (click to toggle)
python-mitogen 0.3.0~rc1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,240 kB
  • sloc: python: 19,899; sh: 91; perl: 19; ansic: 18; makefile: 13
file content (46 lines) | stat: -rw-r--r-- 926 bytes parent folder | download
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
44
45
46

- name: integration/action/transfer_data.yml
  hosts: test-targets
  any_errors_fatal: true
  tasks:

    - file:
        path: /tmp/transfer-data
        state: absent

    # Ensure it JSON-encodes dicts.
    - action_passthrough:
        method: _transfer_data
        kwargs:
          remote_path: /tmp/transfer-data
          data: {
            "I am JSON": true
          }

    - slurp:
        src: /tmp/transfer-data
      register: out

    - assert:
        that: |
          out.content|b64decode == '{"I am JSON": true}'


    # Ensure it handles strings.
    - action_passthrough:
        method: _transfer_data
        kwargs:
          remote_path: /tmp/transfer-data
          data: "I am text."

    - slurp:
        src: /tmp/transfer-data
      register: out

    - assert:
        that:
          out.content|b64decode == 'I am text.'

    - file:
        path: /tmp/transfer-data
        state: absent