8 func (s *NsSuite) TestHttpTps() {
9 finished := make(chan error, 1)
10 server_ip := "10.0.0.2"
13 container := s.getContainerByName("vpp")
15 s.log("starting vpp..")
17 // start & configure vpp in the container
18 _, err := container.execAction("ConfigureHttpTps")
21 go startWget(finished, server_ip, port, "test_file_10M", "client")
27 func (s *VethsSuite) TestHttpCli() {
28 serverContainer := s.getContainerByName("server-vpp")
29 clientContainer := s.getContainerByName("client-vpp")
31 _, err := serverContainer.execAction("Configure2Veths srv")
34 _, err = clientContainer.execAction("Configure2Veths cln")
37 s.log("configured IPs...")
39 _, err = serverContainer.execAction("RunHttpCliSrv")
42 s.log("configured http server")
44 o, err := clientContainer.execAction("RunHttpCliCln /show/version")
47 s.assertContains(o, "<html>", "<html> not found in the result!")
50 func (s *NoTopoSuite) TestNginx() {
52 finished := make(chan error, 1)
53 vppCont := s.getContainerByName("vpp")
54 vppInst := NewVppInstance(vppCont)
55 vppInst.actionFuncName = "ConfigureTap"
56 s.assertNil(vppInst.start(), "failed to start vpp")
58 nginxCont := s.getContainerByName("nginx")
59 s.assertNil(nginxCont.run())
61 time.Sleep(3 * time.Second)
63 defer func() { os.Remove(query) }()
64 go startWget(finished, "10.10.10.1", "80", query, "")
65 s.assertNil(<-finished)