diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2022-11-10 12:34:17 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2022-11-10 18:35:31 +0000 |
commit | b15a0000fff121cdd9ab03c208da429e27901b38 (patch) | |
tree | e2602590c364220af33c8751843c447385970a94 /extras/hs-test/actions.go | |
parent | ee4172ef0a115b6d96cfb0d5cc6ef4fb211c01aa (diff) |
hs-test: add http client connect test
Type: test
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Change-Id: If705d311065e128b4b6df7d8d80910e4be72d3e6
Diffstat (limited to 'extras/hs-test/actions.go')
-rwxr-xr-x | extras/hs-test/actions.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/extras/hs-test/actions.go b/extras/hs-test/actions.go index 7525085632a..1f35ee7df15 100755 --- a/extras/hs-test/actions.go +++ b/extras/hs-test/actions.go @@ -31,6 +31,8 @@ func RegisterActions() { reg("2veths", Configure2Veths) reg("vcl-test-server", RunVclEchoServer) reg("vcl-test-client", RunVclEchoClient) + reg("http-cli-srv", RunHttpCliSrv) + reg("http-cli-cln", RunHttpCliCln) } func configureProxyTcp(ifName0, ipAddr0, ifName1, ipAddr1 string) ConfFn { @@ -51,6 +53,17 @@ func configureProxyTcp(ifName0, ipAddr0, ifName1, ipAddr1 string) ConfFn { } } +func RunHttpCliSrv(args []string) *ActionResult { + cmd := fmt.Sprintf("http cli server") + return ApiCliInband("/tmp/2veths", cmd) +} + +func RunHttpCliCln(args []string) *ActionResult { + cmd := fmt.Sprintf("http cli client uri http://10.10.10.1/80 query %s", getArgs()) + fmt.Println(cmd) + return ApiCliInband("/tmp/2veths", cmd) +} + func ConfigureVppProxy(args []string) *ActionResult { ctx, cancel := newVppContext() defer cancel() |