Integration test fixes.

pull/74531/head
Matt Clay 4 years ago
parent daecb30ac9
commit ca507ff477

@ -320,6 +320,7 @@
- name: run async poll callback test playbook - name: run async poll callback test playbook
command: ansible-playbook {{ role_path }}/callback_test.yml command: ansible-playbook {{ role_path }}/callback_test.yml
delegate_to: localhost
register: callback_output register: callback_output
- assert: - assert:

@ -27,6 +27,7 @@
chdir: '{{role_path}}/files/subdir/subdir1' chdir: '{{role_path}}/files/subdir/subdir1'
warn: no warn: no
with_dict: "{{ symlinks }}" with_dict: "{{ symlinks }}"
delegate_to: localhost
- name: Create remote unprivileged remote user - name: Create remote unprivileged remote user
user: user:
@ -78,6 +79,7 @@
when: ansible_os_family == 'RedHat' and ansible_selinux.get('mode') == 'enforcing' when: ansible_os_family == 'RedHat' and ansible_selinux.get('mode') == 'enforcing'
- import_tasks: no_log.yml - import_tasks: no_log.yml
delegate_to: localhost
- import_tasks: check_mode.yml - import_tasks: check_mode.yml

@ -119,6 +119,7 @@
unarchive: unarchive:
src: '{{ checkout_dir }}/test_role.{{ item }}' src: '{{ checkout_dir }}/test_role.{{ item }}'
dest: '{{ checkout_dir }}/{{ git_archive_prefix }}.{{ item }}' dest: '{{ checkout_dir }}/{{ git_archive_prefix }}.{{ item }}'
remote_src: yes
with_items: "{{ git_archive_extensions[ansible_os_family ~ ansible_distribution_major_version | default('default') ] | default(git_archive_extensions.default) }}" with_items: "{{ git_archive_extensions[ansible_os_family ~ ansible_distribution_major_version | default('default') ] | default(git_archive_extensions.default) }}"
- name: ARCHIVE | Check if prefix directory exists in what's extracted - name: ARCHIVE | Check if prefix directory exists in what's extracted

@ -1 +1 @@
remote_dir: "{{ lookup('env', 'OUTPUT_DIR') }}" remote_dir: "{{ remote_tmp_dir }}"

@ -0,0 +1,2 @@
dependencies:
- setup_remote_tmp_dir

@ -15,6 +15,7 @@
unarchive: unarchive:
src: "{{ remote_tmp_dir }}/test-unarchive.zip" src: "{{ remote_tmp_dir }}/test-unarchive.zip"
dest: "{{ remote_tmp_dir }}/include-zip" dest: "{{ remote_tmp_dir }}/include-zip"
remote_src: yes
include: include:
- FOO-UNAR.TXT - FOO-UNAR.TXT
@ -39,6 +40,7 @@
unarchive: unarchive:
src: "{{ remote_tmp_dir }}/test-unarchive-multi.tar" src: "{{ remote_tmp_dir }}/test-unarchive-multi.tar"
dest: "{{ remote_tmp_dir }}/include-tar" dest: "{{ remote_tmp_dir }}/include-tar"
remote_src: yes
include: include:
- foo-unarchive-777.txt - foo-unarchive-777.txt
@ -61,6 +63,7 @@
unarchive: unarchive:
src: "{{ remote_tmp_dir }}/test-unarchive-multi.tar" src: "{{ remote_tmp_dir }}/test-unarchive-multi.tar"
dest: "{{ remote_tmp_dir }}/include-tar" dest: "{{ remote_tmp_dir }}/include-tar"
remote_src: yes
include: include:
- foo-unarchive-777.txt - foo-unarchive-777.txt
exclude: exclude:

@ -106,6 +106,11 @@
module_hotfixes: no module_hotfixes: no
register: test_repo_add1 register: test_repo_add1
- name: Get repo file contents
slurp:
path: "{{ '/etc/yum.repos.d/' ~ yum_repository_test_repo.name ~ '2.repo' }}"
register: slurp
- name: check that options are correctly getting written to the repo file - name: check that options are correctly getting written to the repo file
assert: assert:
that: that:
@ -116,8 +121,7 @@
- "'keepalive = 0' in repo_file_contents" - "'keepalive = 0' in repo_file_contents"
- "'module_hotfixes = 0' in repo_file_contents" - "'module_hotfixes = 0' in repo_file_contents"
vars: vars:
repo_file: "{{ '/etc/yum.repos.d/' ~ yum_repository_test_repo.name ~ '2.repo' }}" repo_file_contents: "{{ slurp.content | b64decode }}"
repo_file_contents: "{{ lookup('file', repo_file) }}"
- name: check new config doesn't change (Idempotant) - name: check new config doesn't change (Idempotant)
yum_repository: yum_repository:
@ -175,6 +179,11 @@
- ddd - ddd
notify: remove listtest repo notify: remove listtest repo
- name: Get repo file
slurp:
path: /etc/yum.repos.d/listtest.repo
register: slurp
- name: Assert that lists were properly inserted - name: Assert that lists were properly inserted
assert: assert:
that: that:
@ -185,6 +194,6 @@
- "'aaa bbb' in repofile" - "'aaa bbb' in repofile"
- "'ccc ddd' in repofile" - "'ccc ddd' in repofile"
vars: vars:
repofile: "{{ lookup('file', '/etc/yum.repos.d/listtest.repo') }}" repofile: "{{ slurp.content | b64decode }}"
url_hostname: "{{ yum_repository_test_repo.baseurl | urlsplit('hostname') }}" url_hostname: "{{ yum_repository_test_repo.baseurl | urlsplit('hostname') }}"
url_hostname2: "{{ url_hostname | replace('download[0-9]?\\.', 'download2\\.', 1) }}" url_hostname2: "{{ url_hostname | replace('download[0-9]?\\.', 'download2\\.', 1) }}"

Loading…
Cancel
Save