Browse Source

Skip all tests after first failure

From https://github.com/sstephenson/bats/issues/135 via @timkimber
pull/691/head
Timothe Litt 4 years ago
parent
commit
ea831390aa
Failed to extract signature
50 changed files with 271 additions and 0 deletions
  1. +2
    -0
      test/1-simple-http01-dig.bats
  2. +2
    -0
      test/1-simple-http01-nslookup.bats
  3. +5
    -0
      test/1-simple-http01-two-acl.bats
  4. +5
    -0
      test/1-simple-http01.bats
  5. +5
    -0
      test/10-mixed-case.bats
  6. +5
    -0
      test/11-test--install.bats
  7. +7
    -0
      test/11-test-no-domain-storage.bats
  8. +35
    -0
      test/12-auto-upgrade-v1.bats
  9. +5
    -0
      test/13-notify-valid.bats
  10. +5
    -0
      test/14-test-revoke.bats
  11. +5
    -0
      test/15-test-revoke-no-suffix.bats
  12. +5
    -0
      test/16-test-bad-acl.bats
  13. +5
    -0
      test/17-test-spaces-in-sans-dns01.bats
  14. +5
    -0
      test/17-test-spaces-in-sans-http01.bats
  15. +5
    -0
      test/18-retry-dns-add.bats
  16. +2
    -0
      test/19-test-add-to-sans.bats
  17. +14
    -0
      test/2-simple-dns01-dig.bats
  18. +2
    -0
      test/2-simple-dns01-nslookup.bats
  19. +5
    -0
      test/20-wildcard-simple.bats
  20. +5
    -0
      test/21-wildcard-dual-rsa.bats
  21. +5
    -0
      test/22-wildcard-dual-rsa-ecdsa-copy-2-locations.bats
  22. +5
    -0
      test/23-wildcard-check-globbing.bats
  23. +2
    -0
      test/24-wildcard-sans.bats
  24. +5
    -0
      test/25-wildcard-all.bats
  25. +5
    -0
      test/26-wildcard-revoke.bats
  26. +5
    -0
      test/27-wildcard-existing-cert.bats
  27. +5
    -0
      test/28-wildcard-error-http01-validation.bats
  28. +5
    -0
      test/29-check-mktemp-failure.bats
  29. +5
    -0
      test/3-dual-rsa-ecdsa.bats
  30. +2
    -0
      test/30-handle-dig-failure.bats
  31. +5
    -0
      test/31-test-posix-error.bats
  32. +2
    -0
      test/32-test-upgrade.bats
  33. +2
    -0
      test/33-ftp.bats
  34. +2
    -0
      test/34-ftp-passive.bats
  35. +5
    -0
      test/35-preferred-chain.bats
  36. +5
    -0
      test/36-full-chain-inc-root.bats
  37. +2
    -0
      test/37-idn.bats
  38. +5
    -0
      test/38-idn-http01-check-noidnout.bats
  39. +5
    -0
      test/4-more-than-10-hosts.bats
  40. +5
    -0
      test/5-secp384-http01.bats
  41. +2
    -0
      test/6-dual-rsa-ecdsa-copy-2-locations.bats
  42. +2
    -0
      test/7-test-renewal.bats
  43. +28
    -0
      test/8-staging-ecdsa.bats
  44. +5
    -0
      test/9-multiple-domains-dns01.bats
  45. +5
    -0
      test/9-test--all.bats
  46. +2
    -0
      test/u1-test-get_auth_dns-dig.bats
  47. +2
    -0
      test/u2-test-get_auth_dns-drill.bats
  48. +7
    -0
      test/u3-mktemp-template.bats
  49. +5
    -0
      test/u4-create-csr-and-ifs.bats
  50. +2
    -0
      test/u5-test-get_auth_dns-no-root-servers.bats

+ 2
- 0
test/1-simple-http01-dig.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
if [ -f /usr/bin/host ]; then
mv /usr/bin/host /usr/bin/host.getssl.bak
@ -18,6 +19,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -f /usr/bin/host.getssl.bak ]; then
mv /usr/bin/host.getssl.bak /usr/bin/host
fi


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

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
if [ -f /usr/bin/dig ]; then
mv /usr/bin/dig /usr/bin/dig.getssl.bak
@ -18,6 +19,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -f /usr/bin/dig.getssl.bak ]; then
mv /usr/bin/dig.getssl.bak /usr/bin/dig
fi


+ 5
- 0
test/1-simple-http01-two-acl.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 5
- 0
test/1-simple-http01.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


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

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/11-test--install.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 7
- 0
test/11-test-no-domain-storage.bats View File

@ -5,6 +5,13 @@ load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check that if domain storage isn't set getssl doesn't try to delete /tmp" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"


+ 35
- 0
test/12-auto-upgrade-v1.bats View File

@ -5,6 +5,13 @@ load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check that auto upgrade to v2 doesn't change pebble url" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
@ -19,6 +26,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check that auto upgrade to v2 doesn't change v2 staging url" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
@ -33,6 +47,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check that auto upgrade to v2 doesn't change v2 prod url" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
@ -47,6 +68,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check that auto upgrade to v2 changes v1 staging to v2 staging url" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"
@ -61,6 +89,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check that auto upgrade to v2 changes v1 prod to v2 prod url" {
if [ -n "$STAGING" ]; then
skip "Using staging server, skipping internal test"


+ 5
- 0
test/13-notify-valid.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 5
- 0
test/14-test-revoke.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/15-test-revoke-no-suffix.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/16-test-bad-acl.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 5
- 0
test/17-test-spaces-in-sans-dns01.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/17-test-spaces-in-sans-http01.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/18-retry-dns-add.bats View File

@ -5,7 +5,12 @@ load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 2
- 0
test/19-test-add-to-sans.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
curl --silent -X POST -d '{"host":"a.'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/add-a
@ -14,6 +15,7 @@ setup() {
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -z "$STAGING" ]; then
curl --silent -X POST -d '{"host":"a.'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/clear-a
fi


+ 14
- 0
test/2-simple-dns01-dig.bats View File

@ -28,6 +28,13 @@ teardown_file() {
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Create new certificate using DNS-01 verification (dig)" {
CONFIG_FILE="getssl-dns01.cfg"
@ -40,6 +47,13 @@ teardown_file() {
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Force renewal of certificate using DNS-01 (dig)" {
run ${CODE_DIR}/getssl -d -f $GETSSL_HOST
assert_success


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

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi
@ -20,6 +21,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -f /usr/bin/dig.getssl.bak ]; then
mv /usr/bin/dig.getssl.bak /usr/bin/dig
fi


+ 5
- 0
test/20-wildcard-simple.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/21-wildcard-dual-rsa.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/22-wildcard-dual-rsa-ecdsa-copy-2-locations.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# These are run for every test, not once per file
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/23-wildcard-check-globbing.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 2
- 0
test/24-wildcard-sans.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
curl --silent -X POST -d '{"host":"wild-'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/add-a
@ -15,6 +16,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -z "$STAGING" ]; then
curl --silent -X POST -d '{"host":"wild-'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/clear-a
fi


+ 5
- 0
test/25-wildcard-all.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/26-wildcard-revoke.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/27-wildcard-existing-cert.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/28-wildcard-error-http01-validation.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/29-check-mktemp-failure.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/3-dual-rsa-ecdsa.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 2
- 0
test/30-handle-dig-failure.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
if [ -f /usr/bin/drill ]; then
mv /usr/bin/drill /usr/bin/drill.getssl.bak
@ -18,6 +19,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -f /usr/bin/drill.getssl.bak ]; then
mv /usr/bin/drill.getssl.bak /usr/bin/drill
fi


+ 5
- 0
test/31-test-posix-error.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 2
- 0
test/32-test-upgrade.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
# Turn off warning about detached head
@ -32,6 +33,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
rm -r "$INSTALL_DIR/upgrade-getssl"
}


+ 2
- 0
test/33-ftp.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
if [ -n "${VSFTPD_CONF}" ]; then
cp $VSFTPD_CONF ${VSFTPD_CONF}.getssl
@ -23,6 +24,7 @@ _FTP
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -n "${VSFTPD_CONF}" ]; then
cp ${VSFTPD_CONF}.getssl $VSFTPD_CONF
${CODE_DIR}/test/restart-ftpd


+ 2
- 0
test/34-ftp-passive.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
if [ -n "${VSFTPD_CONF}" ]; then
cp $VSFTPD_CONF ${VSFTPD_CONF}.getssl
@ -26,6 +27,7 @@ _FTP
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -n "${VSFTPD_CONF}" ]; then
cp ${VSFTPD_CONF}.getssl $VSFTPD_CONF
${CODE_DIR}/test/restart-ftpd


+ 5
- 0
test/35-preferred-chain.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 5
- 0
test/36-full-chain-inc-root.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
fi


+ 2
- 0
test/37-idn.bats View File

@ -13,6 +13,7 @@ setup_file() {
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
GETSSL_CMD_HOST=${GETSSL_IDN_HOST}
# use the test description to move tools we don't want to test out of the way
@ -26,6 +27,7 @@ setup() {
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
# use the test description to move tools we didn't want to test back
DNS_TOOL=${BATS_TEST_DESCRIPTION##*-}
for tool in dig drill host nslookup


+ 5
- 0
test/38-idn-http01-check-noidnout.bats View File

@ -11,7 +11,12 @@ setup_file() {
fi
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
GETSSL_CMD_HOST=$GETSSL_IDN_HOST
}


+ 5
- 0
test/4-more-than-10-hosts.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 5
- 0
test/5-secp384-http01.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 2
- 0
test/6-dual-rsa-ecdsa-copy-2-locations.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# These are run for every test, not once per file
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
curl --silent -X POST -d '{"host":"'a.$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/add-a
@ -15,6 +16,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -z "$STAGING" ]; then
curl --silent -X POST -d '{"host":"'a.$GETSSL_HOST'"}' http://10.30.50.3:8055/clear-a
fi


+ 2
- 0
test/7-test-renewal.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
if [ -z "$STAGING" ]; then
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
curl --silent -X POST -d '{"host":"a.'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/add-a
@ -15,6 +16,7 @@ setup() {
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
if [ -z "$STAGING" ]; then
curl --silent -X POST -d '{"host":"a.'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/clear-a
curl --silent -X POST -d '{"host":"b.'$GETSSL_HOST'", "addresses":["'$GETSSL_IP'"]}' http://10.30.50.3:8055/clear-a


+ 28
- 0
test/8-staging-ecdsa.bats View File

@ -7,6 +7,13 @@ load '/getssl/test/test_helper.bash'
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Create new certificate using staging server and prime256v1" {
if [ -z "$STAGING" ]; then
skip "Running external tests, skipping internal testing"
@ -22,6 +29,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Force renewal of certificate using staging server and prime256v1" {
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"
@ -33,6 +47,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Create new certificate using staging server and secp384r1" {
if [ -z "$STAGING" ]; then
skip "Running external tests, skipping internal testing"
@ -48,6 +69,13 @@ load '/getssl/test/test_helper.bash'
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Force renewal of certificate using staging server and secp384r1" {
if [ -z "$STAGING" ]; then
skip "Running internal tests, skipping external test"


+ 5
- 0
test/9-multiple-domains-dns01.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
}


+ 5
- 0
test/9-test--all.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
export PATH=$PATH:/getssl
}


+ 2
- 0
test/u1-test-get_auth_dns-dig.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
for app in drill host nslookup
do
if [ -f /usr/bin/${app} ]; then
@ -22,6 +23,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
for app in drill host nslookup
do
if [ -f /usr/bin/${app}.getssl.bak ]; then


+ 2
- 0
test/u2-test-get_auth_dns-drill.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
for app in dig host nslookup
do
if [ -f /usr/bin/${app} ]; then
@ -22,6 +23,7 @@ setup() {
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
for app in dig host nslookup
do
if [ -f /usr/bin/${app}.getssl.bak ]; then


+ 7
- 0
test/u3-mktemp-template.bats View File

@ -5,6 +5,13 @@ load '/bats-assert/load.bash'
load '/getssl/test/test_helper.bash'
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
}
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
@test "Check mktemp -t getssl.XXXXXX works on all platforms" {
run mktemp -t getssl.XXXXXX
assert_success


+ 5
- 0
test/u4-create-csr-and-ifs.bats View File

@ -6,7 +6,12 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
}
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
. /getssl/getssl --source
find_dns_utils
_RUNNING_TEST=1


+ 2
- 0
test/u5-test-get_auth_dns-no-root-servers.bats View File

@ -7,6 +7,7 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
[ ! -f ${BATS_PARENT_TMPNAME}.skip ] || skip "skip remaining tests"
cp /etc/resolv.conf /etc/resolv.conf.getssl
cat <<- EOF > /etc/resolv.conf
nameserver 8.8.8.8
@ -28,6 +29,7 @@ EOF
teardown() {
[ -n "$BATS_TEST_COMPLETED" ] || touch ${BATS_PARENT_TMPNAME}.skip
cat /etc/resolv.conf.getssl > /etc/resolv.conf
for app in drill host nslookup
do


Loading…
Cancel
Save