airshipctl/roles/http-fileserver/tests/main.yaml
Alexander Hughes d5e28362f2 [#62] Standardize yaml file extensions
Currently we have mixed extensions of .yml and .yaml, this patch is
an effort to standardize all yaml documents as .yaml

Change-Id: I7eb815584de5856bbdac9a828ccad8518e8c1729
2020-02-24 14:50:32 +00:00

30 lines
823 B
YAML

- name: Include test variables.
include_vars:
file: vars.yaml
- name: ensure serve directory exists
file:
path: "{{ http_fileserver_serve_dir }}"
state: directory
mode: "0755"
become: true
- name: install http-fileserver
include_role:
name: http-fileserver
- name: trigger all saved handlers
meta: flush_handlers
- name: copy test file to serve directory
become: true
copy:
content: "{{ http_file_server_test_file_content }}"
dest: "{{ http_fileserver_serve_dir }}/{{ http_fileserver_test_file_name }}"
register: file_copy_command
- name: download test file
get_url:
url: "http://localhost:{{ http_fileserver_serve_port }}/{{ http_fileserver_test_file_name }}"
dest: "/tmp/{{ http_fileserver_test_file_name }}"
checksum: "sha1:{{ file_copy_command.checksum }}"