diff --git a/.github/workflows/run-tests-pebble.yml b/.github/workflows/run-tests-pebble.yml index 874ceea..fe82ad6 100644 --- a/.github/workflows/run-tests-pebble.yml +++ b/.github/workflows/run-tests-pebble.yml @@ -73,6 +73,14 @@ jobs: run: docker-compose up -d --build - name: Run test suite on Debian run: test/run-test.sh debian + test-rockylinux8: + 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 RockyLinux8 + run: test/run-test.sh rockylinux8 test-ubuntu: runs-on: ubuntu-latest steps: diff --git a/test/Dockerfile-rockylinux8 b/test/Dockerfile-rockylinux8 new file mode 100644 index 0000000..4b7a135 --- /dev/null +++ b/test/Dockerfile-rockylinux8 @@ -0,0 +1,38 @@ +FROM rockylinux/rockylinux:8 + +# Update and install required software +RUN yum -y update +RUN yum -y install epel-release +RUN yum -y install git curl bind-utils wget which nginx +RUN yum -y install ftp vsftpd +RUN yum -y install openssh-server +RUN yum -y install 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 + +WORKDIR /root +RUN mkdir -p /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 + +# Setup ftp +ENV VSFTPD_CONF=/etc/vsftpd/vsftpd.conf +ENV FTP_PASSIVE_DEFAULT=true +COPY test/test-config/vsftpd.conf /etc/vsftpd/vsftpd.conf +RUN adduser ftpuser +RUN echo 'ftpuser:ftpuser' | chpasswd +RUN adduser www-data +RUN usermod -G www-data ftpuser +RUN usermod -G www-data root +RUN mkdir -p /var/www/.well-known/acme-challenge +RUN chown -R www-data.www-data /var/www +RUN chmod g+w -R /var/www + +# BATS (Bash Automated Testings) +RUN git clone --depth 1 https://github.com/bats-core/bats-core.git /bats-core --branch v1.2.1 +RUN git clone --depth 1 https://github.com/bats-core/bats-support /bats-support +RUN git clone --depth 1 https://github.com/bats-core/bats-assert /bats-assert +RUN /bats-core/install.sh /usr/local diff --git a/test/restart-ftpd b/test/restart-ftpd index f87d9d8..8087437 100755 --- a/test/restart-ftpd +++ b/test/restart-ftpd @@ -2,7 +2,7 @@ if [ "$GETSSL_OS" = "alpine" ]; then killall -HUP vsftpd >&3- -elif [[ "$GETSSL_OS" == "centos"[78] ]]; then +elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then pgrep vsftpd | head -1 | xargs kill -HUP else service vsftpd restart >/dev/null >&3- diff --git a/test/restart-nginx b/test/restart-nginx index 4dc8af0..48ea7ac 100755 --- a/test/restart-nginx +++ b/test/restart-nginx @@ -3,7 +3,7 @@ if [ "$GETSSL_OS" = "alpine" ]; then killall -HUP nginx >&3- sleep 5 -elif [[ "$GETSSL_OS" == "centos"[78] ]]; then +elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then pgrep nginx | head -1 | xargs kill -HUP sleep 5 else diff --git a/test/test_helper.bash b/test/test_helper.bash index 5745332..dedd3ae 100644 --- a/test/test_helper.bash +++ b/test/test_helper.bash @@ -80,7 +80,7 @@ if [[ -f /usr/bin/supervisord && -f /etc/supervisord.conf ]]; then # Give supervisord time to start sleep 1 fi -elif [[ "$GETSSL_OS" == "centos"[78] ]]; then +elif [[ "$GETSSL_OS" == "centos"[78] || "$GETSSL_OS" == "rockylinux"* ]]; then if [ -z "$(pgrep nginx)" ]; then nginx >&3- fi