File: result_binary_producing_junk.yml

package info (click to toggle)
python-mitogen 0.3.26-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,456 kB
  • sloc: python: 22,134; sh: 183; makefile: 74; perl: 19; ansic: 18
file content (46 lines) | stat: -rw-r--r-- 1,215 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
44
45
46

- name: integration/async/result_binary_producing_junk.yml
  gather_facts: true
  hosts: test-targets
  tasks:

  - block:
    - custom_binary_producing_junk_Darwin:
      async: 100
      poll: 0
      register: job_darwin
    - set_fact: job={{job_darwin}}
    when: ansible_system == "Darwin"

  - block:
    - custom_binary_producing_junk_Linux:
      async: 100
      poll: 0
      register: job_linux
    - set_fact: job={{job_linux}}
    when: ansible_system == "Linux"

  - shell: sleep 1

  - slurp:
      src: "{{ansible_user_dir}}/.ansible_async/{{job.ansible_job_id}}"
    register: result

  #- debug: msg={{async_out}}
    #vars:
      #async_out: "{{result.content|b64decode|from_json}}"

  - assert:
      that:
        - async_out.ansible_job_id == job.ansible_job_id
        - async_out.data == "Hello, world.\n"
        - async_out.failed == 1
        - async_out.msg.startswith("Traceback")
        - '"ValueError: No start of json char found\n" in async_out.msg'
        - 'async_out.stderr == "binary_producing_junk: oh noes\n"'
      fail_msg: |
        async_out={{ async_out }}
    vars:
      async_out: "{{result.content|b64decode|from_json}}"
  tags:
    - result_binary_producing_junk