Browse Source

Merge pull request #761 from timkimber/fix-ubuntu-tests

Fix ubuntu and centos8 tests
pull/762/head
Tim Kimber 4 years ago
committed by GitHub
parent
commit
9fd2be989a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 23 deletions
  1. +1
    -1
      .github/workflows/run-tests-staging-acmedns.yml
  2. +1
    -9
      .github/workflows/run-tests-staging-duckdns.yml
  3. +1
    -9
      .github/workflows/run-tests-staging-dynu.yml
  4. +2
    -1
      getssl
  5. +19
    -3
      test/34-ftp-passive.bats
  6. +4
    -0
      test/Dockerfile-centos8

+ 1
- 1
.github/workflows/run-tests-staging-acmedns.yml View File

@ -1,4 +1,4 @@
name: Run all tests using Dynu and acmedns
name: Run tests against Staging server using acmedns
on:
push:
paths-ignore:


+ 1
- 9
.github/workflows/run-tests-staging-duckdns.yml View File

@ -1,13 +1,5 @@
name: Run all tests using DuckDNS
name: Run tests against Staging server using DuckDNS
on:
push:
paths-ignore:
- '.github/workflows/*'
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
branches:
- master


+ 1
- 9
.github/workflows/run-tests-staging-dynu.yml View File

@ -1,13 +1,5 @@
name: Run all tests using Dynu
name: Run tests against Staging server using Dynu
on:
push:
paths-ignore:
- '.github/workflows/*'
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
branches:
- master


+ 2
- 1
getssl View File

@ -3263,7 +3263,8 @@ if [[ "$DUAL_RSA_ECDSA" == "false" ]] && [[ -s "$DOMAIN_DIR/${DOMAIN}.key" ]]; t
_FORCE_RENEW=1
fi ;;
prime256v1|secp384r1|secp521r1)
if grep -q -- "-----BEGIN RSA PRIVATE KEY-----" "$DOMAIN_DIR/${DOMAIN}.key"; then
if grep -q -- "-----BEGIN RSA PRIVATE KEY-----" "$DOMAIN_DIR/${DOMAIN}.key" \
|| grep -q -- "-----BEGIN PRIVATE KEY-----" "$DOMAIN_DIR/${DOMAIN}.key"; then
rm -f "$DOMAIN_DIR/${DOMAIN}.key"
_FORCE_RENEW=1
fi ;;


+ 19
- 3
test/34-ftp-passive.bats View File

@ -44,6 +44,11 @@ teardown() {
mkdir -p /var/www/html/.well-known/acme-challenge
fi
NEW_FTP="false"
if [[ "$(ftp -? 2>&1 | head -1 | cut -c-6)" == "usage:" ]]; then
NEW_FTP="true"
fi
# Always change ownership and permissions in case previous tests created the directories as root
chgrp -R www-data /var/www/html/.well-known
chmod -R g+w /var/www/html/.well-known
@ -56,16 +61,27 @@ teardown() {
ACL="ftp:ftpuser:ftpuser:${GETSSL_CMD_HOST}:/var/www/html/.well-known/acme-challenge"
EOF
if [[ "$FTP_PASSIVE_DEFAULT" == "false" ]]; then
cat <<- EOF3 >> ${INSTALL_DIR}/.getssl/${GETSSL_CMD_HOST}/getssl_test_specific.cfg
FTP_OPTIONS="passive"
if [[ "$NEW_FTP" == "true" ]]; then
# Newer version of ftp, needs "passive on" instead of "passive"
cat <<- EOF3 >> ${INSTALL_DIR}/.getssl/${GETSSL_CMD_HOST}/getssl_test_specific.cfg
FTP_OPTIONS="passive on"
EOF3
else
cat <<- EOF4 >> ${INSTALL_DIR}/.getssl/${GETSSL_CMD_HOST}/getssl_test_specific.cfg
FTP_OPTIONS="passive"
EOF4
fi
fi
create_certificate
assert_success
assert_line --partial "ftp:ftpuser:ftpuser:"
if [[ "$FTP_PASSIVE_DEFAULT" == "false" ]]; then
assert_line --partial "Passive mode on"
if [[ "$NEW_FTP" == "true" ]]; then
assert_line --partial "Passive mode: on"
else
assert_line --partial "Passive mode on"
fi
else
refute_line --partial "Passive mode off"
fi


+ 4
- 0
test/Dockerfile-centos8 View File

@ -2,6 +2,10 @@ FROM centos:centos8
# Note this image does not have drill
# Centos 8 is EOL and is no longer available from the usual mirrors, so switch to https://vault.centos.org
RUN sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/*.repo && \
sed -i 's;^#baseurl=http://mirror;baseurl=https://vault;g' /etc/yum.repos.d/*.repo
# Update and install required software
RUN yum -y update
RUN yum -y install glibc-all-langpacks


Loading…
Cancel
Save