blob: 55f75007590ba6a465019a0e18c405e2ea047e43 [file] [log] [blame]
Filip Tehlar229f5fc2022-08-09 14:44:47 +00001package main
2
3import (
4 "fmt"
5
6 "github.com/edwarnicke/exechelper"
7)
8
9func (s *Veths2Suite) TestEchoBuiltin() {
10 t := s.T()
11 srvInstance := "echo-srv-internal"
12 clnInstance := "echo-cln-internal"
13 err := dockerRun(srvInstance, "")
14 if err != nil {
15 t.Errorf("%v", err)
16 return
17 }
18 defer func() { exechelper.Run("docker stop " + srvInstance) }()
19
20 err = dockerRun(clnInstance, "")
21 if err != nil {
22 t.Errorf("%v", err)
23 return
24 }
25 defer func() { exechelper.Run("docker stop " + clnInstance) }()
26
27 _, err = hstExec("2veths srv", srvInstance)
28 if err != nil {
29 t.Errorf("%v", err)
30 return
31 }
32
33 _, err = hstExec("2veths cln", clnInstance)
34 if err != nil {
35 t.Errorf("%v", err)
36 return
37 }
38
39 _, err = hstExec("echo-srv-internal private-segment-size 1g fifo-size 4 no-echo", srvInstance)
40 if err != nil {
41 t.Errorf("%v", err)
42 return
43 }
44
45 o, err := hstExec("echo-cln-internal nclients 10000 bytes 1 syn-timeout 100 test-timeout 100 no-return private-segment-size 1g fifo-size 4", clnInstance)
46 if err != nil {
47 t.Errorf("%v", err)
48 return
49 }
50 fmt.Println(o)
51}