diff --git a/tests/ansible/integration/all.yml b/tests/ansible/integration/all.yml index 4550e203..e9a12ec8 100644 --- a/tests/ansible/integration/all.yml +++ b/tests/ansible/integration/all.yml @@ -6,6 +6,7 @@ - import_playbook: action/all.yml - import_playbook: async/all.yml - import_playbook: become/all.yml +- import_playbook: connection/all.yml - import_playbook: connection_loader/all.yml - import_playbook: context_service/all.yml - import_playbook: delegation/all.yml diff --git a/tests/ansible/integration/connection/_put_file.yml b/tests/ansible/integration/connection/_put_file.yml new file mode 100644 index 00000000..e93a1e68 --- /dev/null +++ b/tests/ansible/integration/connection/_put_file.yml @@ -0,0 +1,23 @@ +--- + +- shell: dd if=/dev/urandom of=/tmp/{{file_name}} bs=1024 count={{file_size}} + args: + creates: /tmp/{{file_name}} + connection: local + +- copy: + dest: /tmp/{{file_name}}.out + src: /tmp/{{file_name}} + +- stat: path=/tmp/{{file_name}} + register: original + connection: local + +- stat: path=/tmp/{{file_name}} + register: copied + +- assert: + that: + - original.stat.checksum == copied.stat.checksum + #- original.stat.atime == copied.stat.atime + - original.stat.mtime == copied.stat.mtime diff --git a/tests/ansible/integration/connection/all.yml b/tests/ansible/integration/connection/all.yml new file mode 100644 index 00000000..96018d1a --- /dev/null +++ b/tests/ansible/integration/connection/all.yml @@ -0,0 +1,4 @@ +--- + +- import_playbook: put_small_file.yml +- import_playbook: put_large_file.yml diff --git a/tests/ansible/integration/connection/put_large_file.yml b/tests/ansible/integration/connection/put_large_file.yml new file mode 100644 index 00000000..210c5d6a --- /dev/null +++ b/tests/ansible/integration/connection/put_large_file.yml @@ -0,0 +1,12 @@ +# Test transfers made via FileService. +--- + +- name: integration/connection/put_large_file.yml + hosts: test-targets + gather_facts: no + any_errors_fatal: true + vars: + file_name: large-file + file_size: 512 + tasks: + - include_tasks: _put_file.yml diff --git a/tests/ansible/integration/connection/put_small_file.yml b/tests/ansible/integration/connection/put_small_file.yml new file mode 100644 index 00000000..aa6cc0d7 --- /dev/null +++ b/tests/ansible/integration/connection/put_small_file.yml @@ -0,0 +1,12 @@ +# Test small transfers made via RPC. +--- + +- name: integration/connection/put_small_file.yml + hosts: test-targets + gather_facts: no + any_errors_fatal: true + vars: + file_name: small-file + file_size: 123 + tasks: + - include_tasks: _put_file.yml