From 45a26534e9374decc70d3060da30179a80eb34e5 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Wed, 4 Jan 2023 21:25:16 -0600 Subject: [PATCH] Update tests --- .github/workflows/test_set_1.yml | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test_set_1.yml b/.github/workflows/test_set_1.yml index 6a401ba..ffcde34 100644 --- a/.github/workflows/test_set_1.yml +++ b/.github/workflows/test_set_1.yml @@ -17,7 +17,7 @@ jobs: if: github.repository_owner == 'hwdsl2' strategy: matrix: - os_version: ["centos:8s", "centos:7", "rockylinux:8", "almalinux:9", "almalinux:8", "amazonlinux:2", "oraclelinux:9", "oraclelinux:8", "oraclelinux:7"] + os_version: ["centos:9s", "centos:8s", "centos:7", "rockylinux:8", "almalinux:9", "almalinux:8", "amazonlinux:2", "oraclelinux:9", "oraclelinux:8", "oraclelinux:7"] fail-fast: false env: OS_VERSION: ${{ matrix.os_version }} @@ -57,6 +57,11 @@ jobs: if ! command -v amazon-linux-extras; then systemctl restart ipsec fi + if grep -qs -i stream /etc/redhat-release \ + && grep -qs 'release 9' /etc/redhat-release; then + sleep 5 + return 0 + fi echo "Waiting for IPsec to restart." count=0 while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do @@ -91,7 +96,10 @@ jobs: yum -y -q install diffutils fi fi - systemctl start rsyslog + if ! grep -qs -i stream /etc/redhat-release \ + || ! grep -qs 'release 9' /etc/redhat-release; then + systemctl start rsyslog + fi cp -f /opt/src/scripts/vpnsetup.sh . cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh @@ -104,8 +112,11 @@ jobs: systemctl restart xl2tpd restart_ipsec if ! grep -qs 'release 9' /etc/oracle-release; then - restart_fail2ban - cat /var/log/fail2ban.log + if ! grep -qs -i stream /etc/redhat-release \ + || ! grep -qs 'release 9' /etc/redhat-release; then + restart_fail2ban + cat /var/log/fail2ban.log + fi fi netstat -anpu | grep pluto @@ -122,8 +133,11 @@ jobs: iptables -nvL -t nat | grep -q '192\.168\.42\.0/24' iptables -nvL -t nat | grep -q '192\.168\.43\.0/24' fi - grep pluto "$log1" - grep xl2tpd "$log2" + if ! grep -qs -i stream /etc/redhat-release \ + || ! grep -qs 'release 9' /etc/redhat-release; then + grep pluto "$log1" + grep xl2tpd "$log2" + fi ipsec status ipsec status | grep -q l2tp-psk ipsec status | grep -q xauth-psk @@ -244,7 +258,10 @@ jobs: pk12util -W "" -l /etc/ipsec.d/vpnclient.p12 | grep AES-256 && exit 1 restart_ipsec - grep pluto "$log1" | tail -n 20 + if ! grep -qs -i stream /etc/redhat-release \ + || ! grep -qs 'release 9' /etc/redhat-release; then + grep pluto "$log1" | tail -n 20 + fi ipsec status | grep -q ikev2-cp bash ikev2.sh <