1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-10 01:17:19 +00:00

Last commit fixed things, so just cleaning up with this commit

This commit is contained in:
downtownallday 2020-06-03 09:41:27 -04:00
parent e9ac87e63b
commit 44f7392e9e
2 changed files with 18 additions and 34 deletions

View File

@ -18,7 +18,7 @@ before_install:
- (sudo aa-status; true) - (sudo aa-status; true)
# #
- echo "==== System update ====" - echo "==== System update ===="
# Do not run 'upgrade' # Do not run 'upgrade' - takes too long
- sudo apt-get update - sudo apt-get update
# #
- echo "==== Install QA/test prerequisites ====" - echo "==== Install QA/test prerequisites ===="
@ -43,21 +43,20 @@ install:
- sudo ./setup/start.sh -v - sudo ./setup/start.sh -v
script: script:
#- sudo find / -name nsd.service # nsd won't start on Travis without the changes below: ip6 off and
#- sudo sed -i 's|-d|-d -4 -a 0.0.0.0@5053 -p 5053 -V 3|' /etc/systemd/system/multi-user.target.wants/nsd.service # control-enable set to no. Even though the nsd docs says the
#- sudo sed -i 's|-d|-d -4 -a 0.0.0.0@5053 -p 5053 -V 3|' /lib/systemd/system/nsd.service # default value for control-enable is no, running "nsd-checkconf -o
# control-enable /etc/nsd/nsd.conf" returns "yes", so we explicitly
# set it here.
#
# we're assuming that the "ip-address" line is the last line in the
# "server" section of nsd.conf. if this generated file output
# changes, the sed command below may need to be adjusted.
- sudo sed -i 's/ip-address\(.\)\(.*\)/ip-address\1\2\n do-ip4\1 yes\n do-ip6\1 no\n verbosity\1 3\nremote-control\1\n control-enable\1 no/' /etc/nsd/nsd.conf - sudo sed -i 's/ip-address\(.\)\(.*\)/ip-address\1\2\n do-ip4\1 yes\n do-ip6\1 no\n verbosity\1 3\nremote-control\1\n control-enable\1 no/' /etc/nsd/nsd.conf
- sudo systemctl daemon-reload
- sudo systemctl restart nsd
- sudo systemctl status -l nsd
- sudo cat /var/log/nsd.log
- sudo cat /etc/nsd/nsd.conf - sudo cat /etc/nsd/nsd.conf
- sudo nsd-checkconf -o port /etc/nsd/nsd.conf - sudo systemctl restart nsd
- sudo nsd-checkconf -o ip-address /etc/nsd/nsd.conf - sudo systemctl status nsd
- sudo cat /etc/systemd/system/multi-user.target.wants/nsd.service #
- sudo tail -100 /var/log/syslog # launch automated tests, but skip tests that require remote
- sudo ps -efww | grep nsd # smtp support because Travis-CI blocks outgoing port 25
- sudo ss -lp "sport = 8952"
- sudo ss -lp "sport = :domain"
- sudo ss -lp "sport = 5053"
- sudo ./tests/runner.sh -dumpoutput -no-smtp-remote - sudo ./tests/runner.sh -dumpoutput -no-smtp-remote

View File

@ -70,6 +70,9 @@ mgmt_rest() {
record "Ignoring curl return code 56 due to 200 status" record "Ignoring curl return code 56 due to 200 status"
elif [ $code -ne 16 -o $REST_HTTP_CODE -ne 200 ]; then elif [ $code -ne 16 -o $REST_HTTP_CODE -ne 200 ]; then
# any error code will fail the rest call except for a 16
# with a 200 HTTP status.
# 16="a problem was detected in the HTTP2 framing layer. This is somewhat generic and can be one out of several problems"
REST_ERROR="CURL failed with code $code" REST_ERROR="CURL failed with code $code"
record "${F_DANGER}$REST_ERROR${F_RESET}" record "${F_DANGER}$REST_ERROR${F_RESET}"
record "$output" record "$output"
@ -86,15 +89,6 @@ mgmt_rest() {
return 0 return 0
} }
systemctl_reset() {
local service="$1"
# for travis-ci: reset nsd to avoid "nsd.service: Start request
# repeated too quickly", which occurs inside kick() of the
# management flask app when "system restart nsd" is called on
# detection of a new mail domain
record "[systemctl reset-failed $service]"
systemctl reset-failed $service 2>&1 >>$TEST_OF
}
mgmt_create_user() { mgmt_create_user() {
local email="$1" local email="$1"
@ -109,15 +103,6 @@ mgmt_create_user() {
record "[create user $email]" record "[create user $email]"
mgmt_rest POST /admin/mail/users/add "email=$email" "password=$pass" mgmt_rest POST /admin/mail/users/add "email=$email" "password=$pass"
rc=$? rc=$?
if echo "$REST_OUTPUT" | grep "updated DNS:" >/dev/null; then
record "[Detected dns update]"
systemctl status nsd.service >>$TEST_OF
record "Sleeping 5 seconds for services to start"
sleep 5
systemctl status nsd.service >>$TEST_OF
record "[NSD LOG]"
cat /var/log/nsd.log >>$TEST_OF
fi
return $rc return $rc
} }