blob: dd87da1718e7ed36c4c3878f65333f01e82aa867 [file] [log] [blame]
Filip Tehlar229f5fc2022-08-09 14:44:47 +00001package main
2
3import (
4 "github.com/edwarnicke/exechelper"
5)
6
7func (s *NsSuite) TestHttpTps() {
8 t := s.T()
9 finished := make(chan error, 1)
10 server_ip := "10.0.0.2"
11 port := "8080"
12 dockerInstance := "http-tps"
13
14 t.Log("starting vpp..")
15
16 err := dockerRun(dockerInstance, "")
17 if err != nil {
18 t.Errorf("%v", err)
19 return
20 }
21 defer func() { exechelper.Run("docker stop " + dockerInstance) }()
22
23 // start & configure vpp in the container
24 _, err = hstExec(dockerInstance, dockerInstance)
25 if err != nil {
26 t.Errorf("%v", err)
27 return
28 }
29
30 go startWget(finished, server_ip, port, "client")
31 // wait for client
32 err = <-finished
33 if err != nil {
34 t.Errorf("%v", err)
35 }
36}