summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/http_test.go
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2022-12-21 08:59:16 +0100
committerFilip Tehlar <ftehlar@cisco.com>2023-01-09 11:39:06 +0100
commitc204c87c186993704927beffa4d5b1cafaf9a193 (patch)
treeeeb2e5e7a8baad5252df7c8e02c488a2b88432bc /extras/hs-test/http_test.go
parent227660b9969410f29d6b3d14eba16be5f57fbffe (diff)
hs-test: add nginx test
Type: test Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Idd5352f254df0d1f36c1270e73440c9287247b81
Diffstat (limited to 'extras/hs-test/http_test.go')
-rwxr-xr-xextras/hs-test/http_test.go25
1 files changed, 24 insertions, 1 deletions
diff --git a/extras/hs-test/http_test.go b/extras/hs-test/http_test.go
index ae1c8b82e5a..665a3e4fa86 100755
--- a/extras/hs-test/http_test.go
+++ b/extras/hs-test/http_test.go
@@ -1,5 +1,10 @@
package main
+import (
+ "os"
+ "time"
+)
+
func (s *NsSuite) TestHttpTps() {
finished := make(chan error, 1)
server_ip := "10.0.0.2"
@@ -13,7 +18,7 @@ func (s *NsSuite) TestHttpTps() {
_, err := container.execAction("ConfigureHttpTps")
s.assertNil(err)
- go startWget(finished, server_ip, port, "client")
+ go startWget(finished, server_ip, port, "test_file_10M", "client")
// wait for client
err = <-finished
s.assertNil(err)
@@ -41,3 +46,21 @@ func (s *VethsSuite) TestHttpCli() {
s.assertContains(o, "<html>", "<html> not found in the result!")
}
+
+func (s *NoTopoSuite) TestNginx() {
+ query := "return_ok"
+ finished := make(chan error, 1)
+ vppCont := s.getContainerByName("vpp")
+ vppInst := NewVppInstance(vppCont)
+ vppInst.actionFuncName = "ConfigureTap"
+ s.assertNil(vppInst.start(), "failed to start vpp")
+
+ nginxCont := s.getContainerByName("nginx")
+ s.assertNil(nginxCont.run())
+
+ time.Sleep(3 * time.Second)
+
+ defer func() { os.Remove(query) }()
+ go startWget(finished, "10.10.10.1", "80", query, "")
+ s.assertNil(<-finished)
+}