Browse Source

Fix tests for old nginx

pull/578/head
Tim Kimber 5 years ago
parent
commit
82fa60a81f
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
2 changed files with 5 additions and 3 deletions
  1. +4
    -2
      test/6-dual-rsa-ecdsa-copy-2-locations.bats
  2. +1
    -1
      test/test_helper.bash

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

@ -40,8 +40,10 @@ teardown() {
create_certificate
assert_success
check_output_for_errors
assert_line --partial "rsa certificate installed OK on server"
assert_line --partial "prime256v1 certificate installed OK on server"
if [ "$OLD_NGINX" = "false" ]; then
assert_line --partial "rsa certificate installed OK on server"
assert_line --partial "prime256v1 certificate installed OK on server"
fi
# Check that the RSA chain and key have been copied to both locations
assert [ -e "/etc/nginx/pki/domain-chain.crt" ]


+ 1
- 1
test/test_helper.bash View File

@ -12,7 +12,7 @@ check_certificates()
# https://unix.stackexchange.com/questions/285924/how-to-compare-a-programs-version-in-a-shell-script
check_nginx() {
requiredver="1.11.0"
currentver=$(nginx -v 2>&1)
currentver=$(nginx -v 2>&1 | awk -F"/" '{print $2}')
if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then
export OLD_NGINX="false"
else


Loading…
Cancel
Save