Skip to content

Commit

Permalink
Merge branch 'main' of git.osuv.de:m/nextcloud_collection
Browse files Browse the repository at this point in the history
  • Loading branch information
markuman committed Jun 9, 2021
2 parents f2663ee + c02c756 commit b4f433e
Showing 1 changed file with 87 additions and 0 deletions.
87 changes: 87 additions & 0 deletions tests/drone.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
---
- hosts: localhost
connection: local
gather_facts: no

tasks:
- name: wait for nextcloud (pull image and install)
get_url:
url: http://nextcloud21
dest: /tmp/test
register: status
until: status.failed == false
delay: 5
retries: 50

- name: test
block:
########### prepair
- name: Download ansible.svg from wikipedia
get_url:
url: https://de.wikipedia.org/wiki/Ansible#/media/Datei:Ansible_logo.svg
dest: /tmp/ansible.svg

########### test
- name: upload file on nextcloud
markuman.nextcloud.file:
mode: put
src: /tmp/ansible.svg
dest: ansible.svg
ssl_mode: http
register: out_state

- name: state must be changed
assert:
that:
- out_state is changed

- name: GET file from nextcloud
markuman.nextcloud.file:
mode: get
src: ansible.svg
dest: /tmp/tmp.svg
ssl_mode: http
register: out_state

- name: state must be changed
assert:
that:
- out_state is changed

- name: OK fetch file from nextcloud
markuman.nextcloud.file:
mode: get
src: ansible.svg
dest: /tmp/ansible.svg
overwritten: different
ssl_mode: http
register: out_state

- name: state must not be changed
assert:
that:
- out_state is not changed

- name: delete file on nextcloud
markuman.nextcloud.file:
mode: delete
src: ansible.svg
ssl_mode: http
register: out_state

- name: state must be changed
assert:
that:
- out_state is changed

- name: immutable delete file on nextcloud
markuman.nextcloud.file:
mode: delete
src: ansible.svg
ssl_mode: http
register: out_state

- name: state must not be changed
assert:
that:
- out_state is not changed

0 comments on commit b4f433e

Please sign in to comment.