Browse Source

Add centos7 test

pull/528/head
Tim Kimber 6 years ago
parent
commit
0d9b0f4024
No known key found for this signature in database GPG Key ID: 3E1804964E76BD18
5 changed files with 38 additions and 7 deletions
  1. +9
    -1
      .github/workflows/run-all-tests.yml
  2. +6
    -2
      test/2-simple-dns01-nslookup.bats
  3. +20
    -0
      test/Dockerfile-centos7
  4. +1
    -1
      test/debug-test.sh
  5. +2
    -3
      test/test_helper.bash

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

@ -21,8 +21,16 @@ jobs:
- uses: actions/checkout@v1
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on centos6
- name: Run test suite on CentOS6
run: test/run-test.sh centos6
test-centos7:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Build the docker-compose stack
run: docker-compose up -d --build
- name: Run test suite on CentOS7
run: test/run-test.sh centos7
test-centos7-duckdns:
runs-on: ubuntu-latest
steps:


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

@ -8,12 +8,16 @@ load '/getssl/test/test_helper.bash'
# This is run for every test
setup() {
export CURL_CA_BUNDLE=/root/pebble-ca-bundle.crt
mv /usr/bin/dig /usr/bin/dig.getssl.bak
if [ -f /usr/bin/dig ]; then
mv /usr/bin/dig /usr/bin/dig.getssl.bak
fi
}
teardown() {
mv /usr/bin/dig.getssl.bak /usr/bin/dig
if [ -f /usr/bin/dig.getssl.bak ]; then
mv /usr/bin/dig.getssl.bak /usr/bin/dig
fi
}


+ 20
- 0
test/Dockerfile-centos7 View File

@ -0,0 +1,20 @@
FROM centos:centos7
# Note this image uses drill, does not have dig or nslookup installed
# Update and install required software
RUN yum -y update
RUN yum -y install epel-release
RUN yum -y install git curl ldns wget which nginx
WORKDIR /root
RUN mkdir /etc/nginx/pki
RUN mkdir /etc/nginx/pki/private
COPY ./test/test-config/nginx-ubuntu-no-ssl /etc/nginx/conf.d/default.conf
COPY ./test/test-config/nginx-centos7.conf /etc/nginx/nginx.conf
# BATS (Bash Automated Testings)
RUN git clone https://github.com/bats-core/bats-core.git /bats-core
RUN git clone https://github.com/jasonkarns/bats-support /bats-support
RUN git clone https://github.com/jasonkarns/bats-assert-1 /bats-assert
RUN /bats-core/install.sh /usr/local

+ 1
- 1
test/debug-test.sh View File

@ -10,7 +10,7 @@ if [ $# -eq 2 ]; then
fi
#shellcheck disable=SC1091
source /getssl/test/test_helper.bash
source /getssl/test/test_helper.bash 3>&1
CONFIG_FILE=$1
if [ ! -e "$CONFIG_FILE" ]; then


+ 2
- 3
test/test_helper.bash View File

@ -58,15 +58,14 @@ fi
# Find IP address
if [[ -n "$(command -v ip)" ]]; then
IP=$(ip address)
GETSSL_IP=$(ip address | awk '/10.30.50/ { print $2 }' | awk -F/ '{ print $1 }')
elif [[ -n "$(command -v hostname)" ]]; then
IP=$(hostname -I)
GETSSL_IP=$(hostname -I | sed -e 's/[[:space:]]*$//')
else
echo "Cannot find IP address"
exit 1
fi
GETSSL_IP=$(echo "$IP" | awk '/10.30.50/ { print $2 }' | awk -F/ '{ print $1 }')
export GETSSL_IP
if [ ! -f ${INSTALL_DIR}/pebble.minica.pem ]; then


Loading…
Cancel
Save