X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=extras%2Fhs-test%2Fhttp_test.go;h=665a3e4fa8629526ee8d7d789a0040081eb030b2;hb=c204c87c186993704927beffa4d5b1cafaf9a193;hp=ae1c8b82e5aff808f6f202052e5d7aaf80532e9e;hpb=227660b9969410f29d6b3d14eba16be5f57fbffe;p=vpp.git 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, "", " 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) +}