Update tests
This commit is contained in:
parent
c356a75bca
commit
45a26534e9
31
.github/workflows/test_set_1.yml
vendored
31
.github/workflows/test_set_1.yml
vendored
@ -17,7 +17,7 @@ jobs:
|
|||||||
if: github.repository_owner == 'hwdsl2'
|
if: github.repository_owner == 'hwdsl2'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
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
|
fail-fast: false
|
||||||
env:
|
env:
|
||||||
OS_VERSION: ${{ matrix.os_version }}
|
OS_VERSION: ${{ matrix.os_version }}
|
||||||
@ -57,6 +57,11 @@ jobs:
|
|||||||
if ! command -v amazon-linux-extras; then
|
if ! command -v amazon-linux-extras; then
|
||||||
systemctl restart ipsec
|
systemctl restart ipsec
|
||||||
fi
|
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."
|
echo "Waiting for IPsec to restart."
|
||||||
count=0
|
count=0
|
||||||
while ! grep -q "pluto\[$(cat /var/run/pluto/pluto.pid)\]: listening for IKE messages" "$log1"; do
|
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
|
yum -y -q install diffutils
|
||||||
fi
|
fi
|
||||||
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/vpnsetup.sh .
|
||||||
cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh
|
cp -f /opt/src/scripts/extras/vpnuninstall.sh ./vpnunst.sh
|
||||||
@ -104,8 +112,11 @@ jobs:
|
|||||||
systemctl restart xl2tpd
|
systemctl restart xl2tpd
|
||||||
restart_ipsec
|
restart_ipsec
|
||||||
if ! grep -qs 'release 9' /etc/oracle-release; then
|
if ! grep -qs 'release 9' /etc/oracle-release; then
|
||||||
restart_fail2ban
|
if ! grep -qs -i stream /etc/redhat-release \
|
||||||
cat /var/log/fail2ban.log
|
|| ! grep -qs 'release 9' /etc/redhat-release; then
|
||||||
|
restart_fail2ban
|
||||||
|
cat /var/log/fail2ban.log
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
netstat -anpu | grep pluto
|
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\.42\.0/24'
|
||||||
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
iptables -nvL -t nat | grep -q '192\.168\.43\.0/24'
|
||||||
fi
|
fi
|
||||||
grep pluto "$log1"
|
if ! grep -qs -i stream /etc/redhat-release \
|
||||||
grep xl2tpd "$log2"
|
|| ! grep -qs 'release 9' /etc/redhat-release; then
|
||||||
|
grep pluto "$log1"
|
||||||
|
grep xl2tpd "$log2"
|
||||||
|
fi
|
||||||
ipsec status
|
ipsec status
|
||||||
ipsec status | grep -q l2tp-psk
|
ipsec status | grep -q l2tp-psk
|
||||||
ipsec status | grep -q xauth-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
|
pk12util -W "" -l /etc/ipsec.d/vpnclient.p12 | grep AES-256 && exit 1
|
||||||
|
|
||||||
restart_ipsec
|
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
|
ipsec status | grep -q ikev2-cp
|
||||||
|
|
||||||
bash ikev2.sh <<ANSWERS
|
bash ikev2.sh <<ANSWERS
|
||||||
|
Loading…
Reference in New Issue
Block a user