Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[special_collections] simplify tests #4610

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 3 additions & 32 deletions roles/special_collections/molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
gather_facts: false
tasks:
- name: test for presence special collection sudoer commands
lineinfile:
ansible.builtin.lineinfile:
path: "/etc/sudoers"
line: "{{ item }}"
state: present
Expand All @@ -20,29 +20,8 @@
register: present
failed_when:
- present is changed
- name: test for presence special collection apache config
lineinfile:
path: "/etc/apache2/sites-available/000-default.conf"
line: "{{ item }}"
state: present
loop:
- "Alias /special-collections /var/www/special_collections_cap/current"
check_mode: true
register: present
failed_when:
- name: test for presence special collection php ini
lineinfile:
path: "/etc/apache2/sites-available/000-default.conf"
line: "{{ item }}"
state: present
loop:
- "upload_max_filesize = 8M"
- "memory_limit = 256M"
check_mode: true
register: present
failed_when:
- name: test for special collection conf files existence
stat:
ansible.builtin.stat:
path: "{{ item }}"
loop:
- "/home/deploy/settings.php"
Expand All @@ -51,7 +30,7 @@
failed_when:
- not file.stat.exists
- name: test for drupal packages
apt:
ansible.builtin.apt:
name: "{{ item }}"
state: present
loop:
Expand All @@ -63,11 +42,3 @@
register: present
failed_when:
- present is changed
- name: test for cron jobs
command: crontab -l -u deploy
register: cron_results
failed_when:
- name: assert cron jobs exists
assert:
that:
- "'10 * * * * sudo -u www-data drush -r /var/www/special_collections_cap/current cron' in cron_results.stdout"
Loading