tests: verify Connection.put_file() for small/large files.

pull/372/head
David Wilson 6 years ago
parent 863c1b7597
commit 24a44499ca

@ -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

@ -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

@ -0,0 +1,4 @@
---
- import_playbook: put_small_file.yml
- import_playbook: 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

@ -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
Loading…
Cancel
Save