@@ -165,7 +165,7 @@ var _ = framework.KubeDescribe("Pet Store [Feature:Example]", func() {
...
@@ -165,7 +165,7 @@ var _ = framework.KubeDescribe("Pet Store [Feature:Example]", func() {
f:=framework.NewDefaultFramework("petstore")
f:=framework.NewDefaultFramework("petstore")
It(fmt.Sprintf("should scale to persist a nominal number ( %v ) of transactions in %v seconds",k8bpsSmokeTestFinalTransactions,k8bpsSmokeTestTimeout),func(){
It(fmt.Sprintf("should scale to persist a nominal number ( %v ) of transactions in %v seconds",k8bpsSmokeTestFinalTransactions,k8bpsSmokeTestTimeout),func(){
framework.Failf("Image puller didn't complete in %v, not running resource usage test since the metrics might be adulterated",imagePrePullingLongTimeout)
framework.Failf("Image puller didn't complete in %v, not running resource usage test since the metrics might be adulterated",imagePrePullingLongTimeout)
It("each node by ordering unclean reboot and ensure they function upon restart",func(){
It("each node by ordering unclean reboot and ensure they function upon restart",func(){
// unclean shutdown and restart
// unclean shutdown and restart
// We sleep 10 seconds to give some time for ssh command to cleanly finish before the node is shutdown.
// We sleep 10 seconds to give some time for ssh command to cleanly finish before the node is shutdown.
testReboot(f.Client,"nohup sh -c 'sleep 10 && echo b | sudo tee /proc/sysrq-trigger' >/dev/null 2>&1 &")
testReboot(f.Client,f.ClientSet,"nohup sh -c 'sleep 10 && echo b | sudo tee /proc/sysrq-trigger' >/dev/null 2>&1 &")
})
})
It("each node by triggering kernel panic and ensure they function upon restart",func(){
It("each node by triggering kernel panic and ensure they function upon restart",func(){
// kernel panic
// kernel panic
// We sleep 10 seconds to give some time for ssh command to cleanly finish before kernel panic is triggered.
// We sleep 10 seconds to give some time for ssh command to cleanly finish before kernel panic is triggered.
testReboot(f.Client,"nohup sh -c 'sleep 10 && echo c | sudo tee /proc/sysrq-trigger' >/dev/null 2>&1 &")
testReboot(f.Client,f.ClientSet,"nohup sh -c 'sleep 10 && echo c | sudo tee /proc/sysrq-trigger' >/dev/null 2>&1 &")
})
})
It("each node by switching off the network interface and ensure they function upon switch on",func(){
It("each node by switching off the network interface and ensure they function upon switch on",func(){
// switch the network interface off for a while to simulate a network outage
// switch the network interface off for a while to simulate a network outage
// We sleep 10 seconds to give some time for ssh command to cleanly finish before network is down.
// We sleep 10 seconds to give some time for ssh command to cleanly finish before network is down.
testReboot(f.Client,"nohup sh -c 'sleep 10 && (sudo ifdown eth0 || sudo ip link set eth0 down) && sleep 120 && (sudo ifup eth0 || sudo ip link set eth0 up)' >/dev/null 2>&1 &")
testReboot(f.Client,f.ClientSet,"nohup sh -c 'sleep 10 && (sudo ifdown eth0 || sudo ip link set eth0 down) && sleep 120 && (sudo ifup eth0 || sudo ip link set eth0 up)' >/dev/null 2>&1 &")
})
})
It("each node by dropping all inbound packets for a while and ensure they function afterwards",func(){
It("each node by dropping all inbound packets for a while and ensure they function afterwards",func(){
// tell the firewall to drop all inbound packets for a while
// tell the firewall to drop all inbound packets for a while
// We sleep 10 seconds to give some time for ssh command to cleanly finish before starting dropping inbound packets.
// We sleep 10 seconds to give some time for ssh command to cleanly finish before starting dropping inbound packets.
// We still accept packages send from localhost to prevent monit from restarting kubelet.
// We still accept packages send from localhost to prevent monit from restarting kubelet.