testing: Use expect-connection in swanctl scenarios
Only in net2net-start do we have to use `sleep` to ensure the SA is up when the tests are running.
This commit is contained in:
committed by
Andreas Steffen
parent
b77e25c381
commit
ae37090e65
@@ -4,6 +4,8 @@ dave::iptables-restore < /etc/iptables.rules
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -10,6 +10,8 @@ dave::"ip route add fec1:\:/16 via fec0:\:1"
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -7,9 +7,11 @@ moon::ipsec pool --addattr nbns --server PH_IP_VENUS 2> /dev/null
|
||||
moon::iptables-restore < /etc/iptables.rules
|
||||
carol::iptables-restore < /etc/iptables.rules
|
||||
dave::iptables-restore < /etc/iptables.rules
|
||||
moon::service charon start 2> /dev/null
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -4,6 +4,8 @@ dave::iptables-restore < /etc/iptables.rules
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection research
|
||||
carol::expect-connection alice
|
||||
carol::swanctl --initiate --child alice 2> /dev/null
|
||||
carol::swanctl --initiate --child venus 2> /dev/null
|
||||
dave::expect-connection alice
|
||||
dave::swanctl --initiate --child alice 2> /dev/null
|
||||
dave::swanctl --initiate --child venus 2> /dev/null
|
||||
|
||||
@@ -2,5 +2,6 @@ moon::iptables-restore < /etc/iptables.rules
|
||||
sun::iptables-restore < /etc/iptables.rules
|
||||
moon::service charon start 2> /dev/null
|
||||
sun::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection gw-gw
|
||||
sun::expect-connection gw-gw
|
||||
moon::swanctl --initiate --child net-net 2> /dev/null
|
||||
|
||||
@@ -2,5 +2,6 @@ sun::iptables-restore < /etc/iptables.rules
|
||||
moon::iptables-restore < /etc/iptables.rules
|
||||
sun::service charon start 2> /dev/null
|
||||
moon::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
alice::ping -c 3 10.2.0.10
|
||||
sun::expect-connection gw-gw
|
||||
moon::expect-connection gw-gw
|
||||
alice::ping -c 3 -W 1 -i 0.2 PH_IP_BOB
|
||||
|
||||
@@ -2,4 +2,4 @@ sun::iptables-restore < /etc/iptables.rules
|
||||
moon::iptables-restore < /etc/iptables.rules
|
||||
sun::service charon start 2> /dev/null
|
||||
moon::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::sleep 0.5
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection research
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child alice 2> /dev/null
|
||||
carol::swanctl --initiate --child venus 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child alice 2> /dev/null
|
||||
dave::swanctl --initiate --child venus 2> /dev/null
|
||||
|
||||
@@ -4,6 +4,8 @@ dave::iptables-restore < /etc/iptables.rules
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -4,6 +4,8 @@ dave::iptables-restore < /etc/iptables.rules
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -7,6 +7,8 @@ dave::cd /etc/swanctl; rm rsa/* x509/* x509ca/*
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
@@ -7,6 +7,8 @@ dave::cd /etc/swanctl; rm rsa/* x509/* x509ca/*
|
||||
moon::service charon start 2> /dev/null
|
||||
carol::service charon start 2> /dev/null
|
||||
dave::service charon start 2> /dev/null
|
||||
moon::sleep 1
|
||||
moon::expect-connection rw
|
||||
carol::expect-connection home
|
||||
carol::swanctl --initiate --child home 2> /dev/null
|
||||
dave::expect-connection home
|
||||
dave::swanctl --initiate --child home 2> /dev/null
|
||||
|
||||
Reference in New Issue
Block a user