diff options
author | 2017-02-19 18:17:52 +0100 | |
---|---|---|
committer | 2017-02-19 18:18:30 +0100 | |
commit | 662820fa0c9e5cebf23829bdf16bd15af81908c2 (patch) | |
tree | b019c55afeed4a482ca7cbcf08d95ca76c00c501 | |
parent | Bypass portageq in test suite for testing on Ubuntu (diff) | |
download | porticron-662820fa0c9e5cebf23829bdf16bd15af81908c2.tar.gz porticron-662820fa0c9e5cebf23829bdf16bd15af81908c2.tar.bz2 porticron-662820fa0c9e5cebf23829bdf16bd15af81908c2.zip |
Test suite: Fix hostname
-rwxr-xr-x | bin/porticron | 4 | ||||
-rwxr-xr-x | test.bats | 2 | ||||
-rw-r--r-- | test/data/expected-sendmail-input.txt | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/bin/porticron b/bin/porticron index dba785e..a9d9abd 100755 --- a/bin/porticron +++ b/bin/porticron @@ -114,8 +114,8 @@ fi # detect some common variables SCRIPT_NAME=$(basename $0) -FQDN=$(hostname --fqdn) -HOST=$(hostname -s) +: ${FQDN:=$(hostname --fqdn)} +: ${HOST:=$(hostname -s)} IP=$(dig +short ${FQDN} | tr '\n' ' ') : ${DATE:=$(date -R)} : ${PORTDIR:=$(portageq get_repo_path $(portageq envvar EROOT) gentoo)} @@ -19,6 +19,8 @@ PORTICRON() { PORTDIR=/usr/portage \ GLSA_CHECK=/bin/true \ SENDMAIL=${SENDMAIL:-/bin/true} \ + HOST=testbox \ + FQDN=testbox.example.org \ bin/porticron \ -c /dev/null \ "$@" diff --git a/test/data/expected-sendmail-input.txt b/test/data/expected-sendmail-input.txt index 0fac911..1bed225 100644 --- a/test/data/expected-sendmail-input.txt +++ b/test/data/expected-sendmail-input.txt @@ -1,6 +1,6 @@ To: root -From: root@sevendust -Subject: Gentoo package updates on sevendust [ ] +From: root@testbox.example.org +Subject: Gentoo package updates on testbox.example.org [ ] Date: Sun, 19 Feb 2017 16:50:56 +0100 porticron report [Sun, 19 Feb 2017 16:50:56 +0100] @@ -28,7 +28,7 @@ You can perform the upgrade by issuing the command: emerge --deep --update world -as root on sevendust +as root on testbox.example.org It is recommended that you pretend the upgrade first to confirm that the actions that would be taken are reasonable. The upgrade may be |