Skip to content
Snippets Groups Projects
Commit 1a1352a4 authored by ale's avatar ale
Browse files

Add test data for Mailman

Subscribe a test user to the test list.
parent 148a9d8d
Branches
No related tags found
No related merge requests found
Pipeline #83737 passed
......@@ -7,6 +7,13 @@
vars:
testdata_dir: "{{ lookup('env', 'TESTDATA_DIR') | default(playbook_dir + '/../../testdata', True) }}"
- hosts: mailman
gather_facts: no
roles:
- testdata-mailman
vars:
testdata_dir: "{{ lookup('env', 'TESTDATA_DIR') | default(playbook_dir + '/../../testdata', True) }}"
- hosts: web_users
gather_facts: no
roles:
......
---
- set_fact:
test_list_name: "lista"
- name: Trigger list configuration
command: "/opt/ai/scripts/create-lists"
- name: Detect list creation
stat:
path: "/var/lib/mailman/lists/{{ test_list_name }}/config.pck"
register: mailman_test_list
- name: Subscribe test user to test list
shell: "echo uno@investici.org | in-container mailman-mailman /var/lib/mailman/bin/add_members -w n -a n -r - {{ test_list_name }}"
when: "mailman_test_list.exists"
---
- set_fact:
guard_file_path: /etc/.testdata_mailman_ok
- name: Test for guard file
stat:
path: "{{ guard_file_path }}"
register: guard_file
- include_tasks: load.yml
when: "float_ldap_is_master and not guard_file.stat.exists"
- name: Write guard file
file:
path: "{{ guard_file_path }}"
state: touch
changed_when: false
......@@ -211,7 +211,6 @@ class TestMail(TestBase):
self._send_with_xclient,
sender, sender_hostname, sender_addr, rcpt)
def test_send_email_as_alias(self):
# Verify that we can send emails with From (and envelope
# sender) set to an alias of the logged-in user.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment