Update tests

This commit is contained in:
hwdsl2 2023-01-04 21:25:16 -06:00
parent c356a75bca
commit 45a26534e9

View File

@ -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 <<ANSWERS