Update tests

This commit is contained in:
hwdsl2 2022-10-04 23:59:22 -05:00
parent 10a1c7dfe1
commit 34ebb148eb
3 changed files with 112 additions and 2 deletions

View File

@ -42,7 +42,7 @@ jobs:
cd /opt/src
yum -y -q update
yum -y -q install wget rsyslog kmod procps-ng iproute net-tools
yum -y -q install wget rsyslog kmod procps-ng net-tools
systemctl start rsyslog
rm -f /usr/bin/systemd-detect-virt
@ -54,6 +54,61 @@ jobs:
systemctl status wg-quick@wg0
ls -ld ~/client.conf
bash wireguard.sh <<ANSWERS
1
client2
ANSWERS
ls -ld ~/client2.conf
bash wireguard.sh <<ANSWERS
2
ANSWERS
bash wireguard.sh <<ANSWERS | grep -i "2 clients"
2
ANSWERS
bash wireguard.sh <<ANSWERS
3
2
y
ANSWERS
ls -ld ~/client2.conf && exit 1
bash wireguard.sh <<ANSWERS | grep -i "1 client"
2
ANSWERS
bash wireguard.sh <<ANSWERS
4
y
ANSWERS
netstat -anpu | grep ':51820' && exit 1
rm -f ~/client*.conf
bash wireguard.sh <<ANSWERS
ANSWERS
netstat -anpu | grep ':51820'
systemctl status wg-quick@wg0
ls -ld ~/client.conf
bash wireguard.sh <<ANSWERS
4
y
ANSWERS
netstat -anpu | grep ':51820' && exit 1
rm -f ~/client*.conf
exit 0
EOF

View File

@ -31,7 +31,7 @@ jobs:
export DEBIAN_FRONTEND=noninteractive
apt-get -yqq update
apt-get -yqq dist-upgrade
apt-get -yqq install wget rsyslog kmod procps iproute2 net-tools
apt-get -yqq install wget rsyslog kmod procps net-tools
if grep -qs bookworm /etc/debian_version; then
rsyslogd
else

View File

@ -38,3 +38,58 @@ jobs:
sudo netstat -anpu | grep ':51820'
sudo systemctl status wg-quick@wg0
ls -ld ~/client.conf
sudo bash wireguard.sh <<ANSWERS
1
client2
ANSWERS
ls -ld ~/client2.conf
sudo bash wireguard.sh <<ANSWERS
2
ANSWERS
sudo bash wireguard.sh <<ANSWERS | grep -i "2 clients"
2
ANSWERS
sudo bash wireguard.sh <<ANSWERS
3
2
y
ANSWERS
ls -ld ~/client2.conf && exit 1
sudo bash wireguard.sh <<ANSWERS | grep -i "1 client"
2
ANSWERS
sudo bash wireguard.sh <<ANSWERS
4
y
ANSWERS
sudo netstat -anpu | grep ':51820' && exit 1
rm -f ~/client*.conf
sudo bash wireguard.sh <<ANSWERS
ANSWERS
sudo netstat -anpu | grep ':51820'
sudo systemctl status wg-quick@wg0
ls -ld ~/client.conf
sudo bash wireguard.sh <<ANSWERS
4
y
ANSWERS
sudo netstat -anpu | grep ':51820' && exit 1
rm -f ~/client*.conf