hs-test: added dry run mode
- DRYRUN=true will set up most containers. Some need to be started
manually (curl, nginx...). The framework will create a vpp-config
file with interface configs that will get executed on VPP startup.
- set Ginkgo to use -v instead of -vv when running a single test
- s.Log() now supports formatting
- added 'useEnvVars' parameter to container.Exec
Type: test
Change-Id: Id1da7947a1448ee4b74b86cc4f243442256a5ba8
Signed-off-by: Adrian Villin <avillin@cisco.com>
diff --git a/extras/hs-test/vcl_test.go b/extras/hs-test/vcl_test.go
index 81da0c5..68ca9d0 100644
--- a/extras/hs-test/vcl_test.go
+++ b/extras/hs-test/vcl_test.go
@@ -51,7 +51,7 @@
testClientCommand := "vcl_test_client -N 100 -p " + proto + " " + serverVeth.Ip4AddressString() + " " + port
s.Log(testClientCommand)
echoClnContainer.AddEnvVar("VCL_CONFIG", "/vcl.conf")
- o := echoClnContainer.Exec(testClientCommand)
+ o := echoClnContainer.Exec(true, testClientCommand)
s.Log(o)
s.AssertContains(o, "CLIENT RESULTS")
}
@@ -72,7 +72,7 @@
srvAppCont.CreateFile("/vcl.conf", getVclConfig(srvVppCont))
srvAppCont.AddEnvVar("VCL_CONFIG", "/vcl.conf")
vclSrvCmd := fmt.Sprintf("vcl_test_server -p %s %s", proto, port)
- srvAppCont.ExecServer(vclSrvCmd)
+ srvAppCont.ExecServer(true, vclSrvCmd)
serverVeth := s.GetInterfaceByName(ServerInterfaceName)
serverVethAddress := serverVeth.Ip4AddressString()
@@ -90,7 +90,7 @@
srvAppCont.CreateFile("/vcl.conf", getVclConfig(srvVppCont))
srvAppCont.AddEnvVar("VCL_CONFIG", "/vcl.conf")
- srvAppCont.ExecServer("vcl_test_server -p " + proto + " " + port)
+ srvAppCont.ExecServer(true, "vcl_test_server -p "+proto+" "+port)
serverVeth := s.GetInterfaceByName(ServerInterfaceName)
serverVethAddress := serverVeth.Ip4AddressString()
@@ -100,7 +100,7 @@
testClientCommand := "vcl_test_client -p " + proto + " " + serverVethAddress + " " + port
echoClnContainer.AddEnvVar("VCL_CONFIG", "/vcl.conf")
- o := echoClnContainer.Exec(testClientCommand)
+ o := echoClnContainer.Exec(true, testClientCommand)
s.Log(o)
}
@@ -128,7 +128,7 @@
echoSrvContainer.CreateFile("/vcl.conf", getVclConfig(echoSrvContainer))
echoSrvContainer.AddEnvVar("VCL_CONFIG", "/vcl.conf")
- echoSrvContainer.ExecServer("vcl_test_server -p " + proto + " 12346")
+ echoSrvContainer.ExecServer(true, "vcl_test_server -p "+proto+" 12346")
s.Log("This whole test case can take around 3 minutes to run. Please be patient.")
s.Log("... Running first echo client test, before disconnect.")
@@ -141,14 +141,14 @@
testClientCommand := "vcl_test_client -U -p " + proto + " " + serverVethAddress + " 12346"
echoClnContainer.AddEnvVar("VCL_CONFIG", "/vcl.conf")
- o := echoClnContainer.Exec(testClientCommand)
+ o := echoClnContainer.Exec(true, testClientCommand)
s.Log(o)
s.Log("... First test ended. Stopping VPP server now.")
// Stop server-vpp-instance, start it again and then run vcl-test-client once more
srvVppContainer.VppInstance.Disconnect()
stopVppCommand := "/bin/bash -c 'ps -C vpp_main -o pid= | xargs kill -9'"
- srvVppContainer.Exec(stopVppCommand)
+ srvVppContainer.Exec(false, stopVppCommand)
s.SetupServerVpp()
@@ -156,7 +156,7 @@
time.Sleep(30 * time.Second) // Wait a moment for the re-attachment to happen
s.Log("... Running second echo client test, after disconnect and re-attachment.")
- o = echoClnContainer.Exec(testClientCommand)
+ o = echoClnContainer.Exec(true, testClientCommand)
s.Log(o)
s.Log("Done.")
}