Browse Source

Cleanup after test succeeds

pull/542/head
Tim Kimber 6 years ago
parent
commit
ac5ef33011
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
1 changed files with 7 additions and 9 deletions
  1. +7
    -9
      test/11-test--install.bats

+ 7
- 9
test/11-test--install.bats View File

@ -18,8 +18,10 @@ setup() {
CONFIG_FILE="getssl-http01.cfg"
setup_environment
# Fail if not running in docker and /etc/getssl already exists
refute [ -d /etc/getssl ]
# Create /etc/getssl/$DOMAIN
rm -rf /etc/getssl
mkdir -p /etc/getssl/${GETSSL_CMD_HOST}
# Copy the config file to /etc/getssl
@ -40,19 +42,12 @@ setup() {
@test "Check that --install doesn't call the ACME server" {
# NOTE that this test depends on the previous test!
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
fi
CONFIG_FILE="getssl-http01.cfg"
#setup_environment
# Create /etc/getssl/$DOMAIN
#mkdir -p /etc/getssl/${GETSSL_CMD_HOST}
# Copy the config file to /etc/getssl
#cp "${CODE_DIR}/test/test-config/${CONFIG_FILE}" "/etc/getssl/${GETSSL_CMD_HOST}/getssl.cfg"
#cp "${CODE_DIR}/test/test-config/getssl-etc-template.cfg" "/etc/getssl/getssl.cfg"
# Run getssl
run ${CODE_DIR}/getssl --install "$GETSSL_CMD_HOST"
@ -66,4 +61,7 @@ setup() {
assert_line --partial 'copying domain certificate to'
assert_line --partial 'copying private key to'
assert_line --partial 'copying CA certificate to'
# Cleanup previous test
rm -rf /etc/getssl
}

Loading…
Cancel
Save