Zack Williams | a276311 | 2017-01-03 11:38:38 -0700 | [diff] [blame] | 1 | --- |
| 2 | # api-tests/tasks/main.yml |
| 3 | |
| 4 | - name: Copy apiary.apib to target location |
| 5 | copy: |
| 6 | src: "{{ cord_dir }}/orchestration/xos/apiary.apib" |
| 7 | dest: "/opt/xos/tests/api/apiary.apib" |
| 8 | |
| 9 | - name: Run API tests |
| 10 | command: "npm test" |
| 11 | args: |
| 12 | chdir: "/opt/xos/tests/api" |
| 13 | register: api_tests_out |
| 14 | ignore_errors: yes |
| 15 | tags: |
| 16 | - skip_ansible_lint # run during testing only |
| 17 | |
| 18 | - name: Save output from API tests |
| 19 | copy: |
| 20 | content: "{{ api_tests_out.stdout_lines }}" |
| 21 | dest: "/tmp/api-tests.out" |
| 22 | |
| 23 | - name: Print output from API test |
| 24 | debug: var=api_tests_out.stdout_lines |
| 25 | |