Browse Source

Merge staging server tests into normal tests

pull/589/head
Tim Kimber 5 years ago
parent
commit
c1346a1be8
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
5 changed files with 5 additions and 102 deletions
  1. +0
    -22
      test/10-mixed-case-staging.bats
  2. +4
    -2
      test/10-mixed-case.bats
  3. +1
    -1
      test/2-simple-dns01-nslookup.bats
  4. +0
    -32
      test/7-staging-dns01-dig.bats
  5. +0
    -45
      test/7-staging-dns01-nslookup.bats

+ 0
- 22
test/10-mixed-case-staging.bats View File

@ -1,22 +0,0 @@
#! /usr/bin/env bats
load '/bats-support/load.bash'
load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
@test "Check can create certificate if domain is not lowercase using staging server and DuckDNS" {
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"
fi
CONFIG_FILE="getssl-staging-dns01.cfg"
GETSSL_CMD_HOST=$(echo $GETSSL_HOST | tr a-z A-Z)
setup_environment
init_getssl
create_certificate
assert_success
check_output_for_errors
}

+ 4
- 2
test/10-mixed-case.bats View File

@ -28,9 +28,11 @@ setup() {
@test "Check that DNS-01 verification works if the domain is not lowercase" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
CONFIG_FILE="getssl-staging-dns01.cfg"
else
CONFIG_FILE="getssl-dns01.cfg"
fi
CONFIG_FILE="getssl-dns01.cfg"
GETSSL_CMD_HOST=$(echo $GETSSL_HOST | tr a-z A-Z)
setup_environment


+ 1
- 1
test/2-simple-dns01-nslookup.bats View File

@ -30,7 +30,7 @@ teardown() {
@test "Create new certificate using DNS-01 verification (nslookup)" {
CONFIG_FILE="getssl-dns01.cfg"
if [ -n "$STAGING" ]; then
CONFIG_FILE="getssl-dns01.cfg"
CONFIG_FILE="getssl-staging-dns01.cfg"
fi
setup_environment


+ 0
- 32
test/7-staging-dns01-dig.bats View File

@ -1,32 +0,0 @@
#! /usr/bin/env bats
load '/bats-support/load.bash'
load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
@test "Create new certificate using staging server, dig and DuckDNS" {
skip
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"
fi
CONFIG_FILE="getssl-staging-dns01.cfg"
setup_environment
init_getssl
create_certificate
assert_success
check_output_for_errors
}
@test "Force renewal of certificate using staging server, dig and DuckDNS" {
skip
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"
fi
run ${CODE_DIR}/getssl -f $GETSSL_HOST
assert_success
check_output_for_errors
cleanup_environment
}

+ 0
- 45
test/7-staging-dns01-nslookup.bats View File

@ -1,45 +0,0 @@
#! /usr/bin/env bats
load '/bats-support/load.bash'
load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
if [ -f /usr/bin/dig ]; then
mv /usr/bin/dig /usr/bin/dig.getssl.bak
fi
}
teardown() {
if [ -f /usr/bin/dig.getssl.bak ]; then
mv /usr/bin/dig.getssl.bak /usr/bin/dig
fi
}
@test "Create new certificate using staging server, nslookup and DuckDNS" {
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"
fi
CONFIG_FILE="getssl-staging-dns01.cfg"
setup_environment
init_getssl
create_certificate
assert_success
check_output_for_errors "debug"
}
@test "Force renewal of certificate using staging server, nslookup and DuckDNS" {
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"
fi
run ${CODE_DIR}/getssl -f $GETSSL_HOST
assert_success
check_output_for_errors "debug"
cleanup_environment
}

Loading…
Cancel
Save