Browse Source

Merge pull request #857 from srvrco/more-test-fixes

More test fixes
pull/841/merge
Tim Kimber 1 year ago
committed by GitHub
parent
commit
8828c3e2f8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
23 changed files with 94 additions and 87 deletions
  1. +1
    -1
      .github/workflows/release-and-package.yml
  2. +13
    -13
      .github/workflows/run-tests-pebble.yml
  3. +1
    -1
      .github/workflows/run-tests-staging-acmedns.yml
  4. +2
    -4
      .github/workflows/run-tests-staging-duckdns.yml
  5. +3
    -5
      .github/workflows/run-tests-staging-dynu.yml
  6. +1
    -1
      .github/workflows/shellcheck.yml
  7. +14
    -3
      getssl
  8. +0
    -2
      test/24-wildcard-sans.bats
  9. +3
    -3
      test/Dockerfile-centos7
  10. +5
    -5
      test/Dockerfile-centos7-duckdns
  11. +5
    -5
      test/Dockerfile-centos7-dynu
  12. +3
    -3
      test/Dockerfile-centos8
  13. +3
    -3
      test/Dockerfile-debian
  14. +3
    -3
      test/Dockerfile-rockylinux8
  15. +4
    -4
      test/Dockerfile-ubuntu
  16. +8
    -8
      test/Dockerfile-ubuntu-acmedns
  17. +6
    -6
      test/Dockerfile-ubuntu-duckdns
  18. +6
    -6
      test/Dockerfile-ubuntu-dynu
  19. +3
    -3
      test/Dockerfile-ubuntu14
  20. +3
    -3
      test/Dockerfile-ubuntu16
  21. +3
    -3
      test/Dockerfile-ubuntu18
  22. +2
    -0
      test/run-test.sh
  23. +2
    -2
      test/u2-test-get_auth_dns-drill.bats

+ 1
- 1
.github/workflows/release-and-package.yml View File

@ -43,7 +43,7 @@ jobs:
mkdir -p ${{ github.workspace }}/rpmbuild/RPMS/SRPMS
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: source


+ 13
- 13
.github/workflows/run-tests-pebble.yml View File

@ -17,7 +17,7 @@ jobs:
test-alpine:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Alpine
@ -25,7 +25,7 @@ jobs:
test-bash-4-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Alpine using Bash 4.0
@ -33,7 +33,7 @@ jobs:
test-bash-4-2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Alpine using Bash 4.2
@ -41,7 +41,7 @@ jobs:
test-bash-5-0:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Alpine using Bash 5
@ -49,7 +49,7 @@ jobs:
test-centos6:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on CentOS6
@ -57,7 +57,7 @@ jobs:
test-centos7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on CentOS7
@ -65,7 +65,7 @@ jobs:
test-centos8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on CentOS8
@ -73,7 +73,7 @@ jobs:
test-debian:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Debian
@ -81,7 +81,7 @@ jobs:
test-rockylinux8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on RockyLinux8
@ -89,7 +89,7 @@ jobs:
test-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu
@ -97,7 +97,7 @@ jobs:
test-ubuntu14:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu14
@ -105,7 +105,7 @@ jobs:
test-ubuntu16:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu16
@ -113,7 +113,7 @@ jobs:
test-ubuntu18:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu18


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

@ -20,7 +20,7 @@ jobs:
test-ubuntu-acmedns:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu against Staging using acmedns


+ 2
- 4
.github/workflows/run-tests-staging-duckdns.yml View File

@ -1,15 +1,13 @@
name: Run tests against Staging server using DuckDNS
on:
workflow_dispatch:
branches:
- master
env:
DUCKDNS_TOKEN: ${{ secrets.DUCKDNS_TOKEN == '' && '1d616aa9-b8e4-4bb4-b312-3289de82badb' || secrets.DUCKDNS_TOKEN }}
jobs:
test-centos7-duckdns:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on CentOS7 against Staging using DuckDNS
@ -19,7 +17,7 @@ jobs:
if: always()
needs: test-centos7-duckdns
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu against Staging using DuckDNS


+ 3
- 5
.github/workflows/run-tests-staging-dynu.yml View File

@ -1,15 +1,13 @@
name: Run tests against Staging server using Dynu
on:
workflow_dispatch:
branches:
- master
workflow_dispatch
env:
DYNU_API_KEY: ${{ secrets.DYNU_API_KEY == '' && '65cXefd35XbYf36546eg5dYcZT6X52Y2' || secrets.DYNU_API_KEY }}
jobs:
test-centos7-dynu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on CentOS7 against Staging using Dynu
@ -19,7 +17,7 @@ jobs:
if: always()
needs: test-centos7-dynu
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Build the docker compose stack
run: docker compose up -d --build
- name: Run test suite on Ubuntu against Staging using Dynu


+ 1
- 1
.github/workflows/shellcheck.yml View File

@ -17,7 +17,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Lint check
uses: azohra/shell-linter@latest
with:


+ 14
- 3
getssl View File

@ -1622,9 +1622,20 @@ get_auth_dns() { # get the authoritative dns server for a domain (sets primary_n
# Query for NS records
if [[ -z "$res" ]]; then
debug Using "$HAS_DIG_OR_DRILL $DNS_CHECK_OPTIONS ${gad_s} NS ${gad_d}" to find primary nameserver
# shellcheck disable=SC2086
res=$($HAS_DIG_OR_DRILL $DNS_CHECK_OPTIONS ${gad_s} NS "${gad_d}"| grep -E "IN\W(NS|SOA)\W")
out="SERVFAIL"
i=0
while [[ "$out" == *"SERVFAIL"* ]] && [[ $i -lt 5 ]]; do
debug Using "$HAS_DIG_OR_DRILL $DNS_CHECK_OPTIONS ${gad_s} NS ${gad_d}" to find primary nameserver
# shellcheck disable=SC2086
out=$($HAS_DIG_OR_DRILL $DNS_CHECK_OPTIONS ${gad_s} NS "${gad_d}")
res=$(echo "$out"| grep -E "IN\W(NS|SOA)\W")
if [[ "$out" == *SERVFAIL* ]]; then
debug Output from "$HAS_DIG_OR_DRILL $DNS_CHECK_OPTIONS ${gad_s} NS ${gad_d}" contains SERVFAIL
debug "$out"
sleep 2
fi
((i++))
done
fi
if [[ -n "$res" ]]; then


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

@ -50,7 +50,6 @@ teardown_file() {
check_output_for_errors
run openssl x509 -noout -text -in "${INSTALL_DIR}/.getssl/${GETSSL_CMD_HOST}/${GETSSL_CMD_HOST}.crt"
# verify certificate is for wildcard domain with non-wildcard domain in the Subject Alternative Name list
# assert_output --regexp "Subject: CN[ ]?=[ ]?\*.wild-${GETSSL_HOST}"
assert_output --partial "DNS:${GETSSL_HOST}"
}
@ -69,6 +68,5 @@ teardown_file() {
check_output_for_errors
run openssl x509 -noout -text -in "${INSTALL_DIR}/.getssl/${GETSSL_CMD_HOST}/${GETSSL_CMD_HOST}.crt"
# verify certificate is for non-wildcard domain with wildcard domain in the Subject Alternative Name list
# assert_output --regexp "Subject: CN[ ]?=[ ]?${GETSSL_HOST}"
assert_output --partial "DNS:*.wild-${GETSSL_HOST}"
}

+ 3
- 3
test/Dockerfile-centos7 View File

@ -13,9 +13,9 @@ RUN yum -y install ftp vsftpd
RUN yum -y install openssh-server
# Set locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 5
- 5
test/Dockerfile-centos7-duckdns View File

@ -8,12 +8,12 @@ RUN yum -y install epel-release
RUN yum -y install git curl bind-utils ldns wget which nginx jq
# Set locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV staging "true"
ENV dynamic_dns "dynu"
ENV staging="true"
ENV dynamic_dns="dynu"
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 5
- 5
test/Dockerfile-centos7-dynu View File

@ -8,12 +8,12 @@ RUN yum -y install epel-release
RUN yum -y install git curl bind-utils ldns wget which nginx jq
# Set locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
ENV staging "true"
ENV dynamic_dns "duckdns"
ENV staging="true"
ENV dynamic_dns="duckdns"
WORKDIR /root
RUN mkdir -p /etc/nginx/pki


+ 3
- 3
test/Dockerfile-centos8 View File

@ -15,9 +15,9 @@ RUN yum -y install ftp vsftpd
RUN yum -y install openssh-server
# Set locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 3
- 3
test/Dockerfile-debian View File

@ -11,9 +11,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 3
- 3
test/Dockerfile-rockylinux8 View File

@ -10,9 +10,9 @@ RUN yum -y update && \
glibc-locale-source glibc-langpack-en # for en_US.UTF-8 support
# Set locale
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 4
- 4
test/Dockerfile-ubuntu View File

@ -3,7 +3,7 @@ FROM ubuntu:latest
# Note this image uses mawk1.3
# Set noninteractive otherwise tzdata hangs
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Update and install required software
RUN apt-get update --fix-missing
@ -15,9 +15,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
# Setup ftp
ENV VSFTPD_CONF=/etc/vsftpd.conf


+ 8
- 8
test/Dockerfile-ubuntu-acmedns View File

@ -3,14 +3,14 @@ FROM ubuntu:latest
# Note this image uses mawk1.3
# Set noninteractive otherwise tzdata hangs
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Ensure tests in this image use the staging server
ENV staging "true"
ENV staging="true"
# 2016ENV dynamic_dns "acme-dns"
ENV ACMEDNS_API_USER 49ac5f6d-74cd-4aca-acfe-f9457af7894c
ENV ACMEDNS_API_KEY 2NPGF8cH7PeTrHZWXImi1prhTsQGz2pdCC7Za5zE
ENV ACMEDNS_SUBDOMAIN 7268181b-7075-4dce-be51-9c20c205cf6e
ENV ACMEDNS_API_USER=49ac5f6d-74cd-4aca-acfe-f9457af7894c
ENV ACMEDNS_API_KEY=2NPGF8cH7PeTrHZWXImi1prhTsQGz2pdCC7Za5zE
ENV ACMEDNS_SUBDOMAIN=7268181b-7075-4dce-be51-9c20c205cf6e
# Update and install required software
RUN apt-get update --fix-missing
@ -20,9 +20,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root


+ 6
- 6
test/Dockerfile-ubuntu-duckdns View File

@ -3,11 +3,11 @@ FROM ubuntu:latest
# Note this image uses mawk1.3
# Set noninteractive otherwise tzdata hangs
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Ensure tests in this image use the staging server
ENV staging "true"
ENV dynamic_dns "duckdns"
ENV staging="true"
ENV dynamic_dns="duckdns"
# Update and install required software
RUN apt-get update --fix-missing
@ -17,9 +17,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root


+ 6
- 6
test/Dockerfile-ubuntu-dynu View File

@ -3,11 +3,11 @@ FROM ubuntu:latest
# Note this image uses mawk1.3
# Set noninteractive otherwise tzdata hangs
ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Ensure tests in this image use the staging server
ENV staging "true"
ENV dynamic_dns "dynu"
ENV staging="true"
ENV dynamic_dns="dynu"
# Update and install required software
RUN apt-get update --fix-missing
@ -17,9 +17,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root


+ 3
- 3
test/Dockerfile-ubuntu14 View File

@ -13,9 +13,9 @@ RUN apt-get update --fix-missing && \
# Set locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 3
- 3
test/Dockerfile-ubuntu16 View File

@ -12,9 +12,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 3
- 3
test/Dockerfile-ubuntu18 View File

@ -12,9 +12,9 @@ RUN apt-get install -y locales # for idn testing
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8
WORKDIR /root
RUN mkdir -p /etc/nginx/pki/private


+ 2
- 0
test/run-test.sh View File

@ -14,6 +14,8 @@ if [ $# -gt 1 ]; then
if [[ $COMMAND != "bats /getssl/test"* ]]; then
if [[ $COMMAND == /getssl/test* ]]; then
COMMAND="bats $COMMAND"
elif [[ $COMMAND == test/* ]]; then
COMMAND="bats /getssl/$COMMAND"
else
COMMAND="bats /getssl/test/$COMMAND"
fi


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

@ -66,14 +66,14 @@ teardown() {
run get_auth_dns ubuntu-getssl.ignorelist.com
# Assert that we've found the primary_ns server
assert_output --regexp 'set primary_ns = ns[1-3]+\.afraid\.org'
assert_output --regexp 'set primary_ns = ns[1-4]+\.afraid\.org'
# Assert that we had to use drill NS
assert_line --regexp 'Using drill.* NS'
# Check all Authoritive DNS servers are returned if requested
CHECK_ALL_AUTH_DNS=true
run get_auth_dns ubuntu-getssl.ignorelist.com
assert_output --regexp 'set primary_ns = (ns[1-3]+\.afraid\.org ?)+'
assert_output --regexp 'set primary_ns = (ns[1-4]+\.afraid\.org ?)+'
}


Loading…
Cancel
Save