Skip to content
Permalink
Browse files

[ci] Add test script for 'debops.postfix' role

  • Loading branch information...
drybjed committed Aug 11, 2019
1 parent 9c3e7aa commit b8aecf0d3b8ea45392ae3b6f648e6280dc216fdf
Showing with 20 additions and 0 deletions.
  1. +1 −0 .gitlab-ci.yml
  2. +8 −0 lib/tests/inventory/common/postfix.json
  3. +11 −0 lib/tests/scripts/postfix-send-mail
@@ -1163,6 +1163,7 @@ stages:
variables:
JANE_TEST_FACT: 'postfix.fact'
JANE_TEST_PLAY: '${DEBOPS_PLAYBOOKS}/service/postfix.yml'
JANE_TEST_SCRIPT: '${TEST_SCRIPTS}/postfix-send-mail'
JANE_INVENTORY_GROUPS: 'debops_service_postfix'
JANE_DIFF_PATTERN: '.*/debops.postfix/.*'
JANE_LOG_PATTERN: '\[debops\.postfix\]'
@@ -0,0 +1,8 @@
{
"postfix__maincf": [
{
"name": "mydestination",
"value": ["vagrant.test"]
}
]
}
@@ -0,0 +1,11 @@
#!/bin/bash

set -o nounset -o pipefail -o errexit

jane notify info "Sending test mail message to root..."
printf "Hello, world!\\n\\nThis is a test message from Jane.\\n" \
| mail -a "Content-Type: text/plain; charset=utf-8" \
-s "Test message" "root@$(hostname -f)"

jane notify info "Displaying root mailbox..."
sudo cat /var/mail/root

0 comments on commit b8aecf0

Please sign in to comment.
You can’t perform that action at this time.