summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/proxy_test.go
diff options
context:
space:
mode:
authorFilip Tehlar <ftehlar@cisco.com>2022-11-22 12:49:22 +0100
committerFlorin Coras <florin.coras@gmail.com>2022-11-25 00:37:20 +0000
commit1a9dc75fe8099fdde9b1dd248a8fca35b001f9fc (patch)
tree729ad4b6b531ca3905434e1cbb4a950fff18dad6 /extras/hs-test/proxy_test.go
parentb79d09bbfa93f0f752f7249ad27a08eae0863a6b (diff)
hs-test: auto register test actions
Type: improvement Signed-off-by: Filip Tehlar <ftehlar@cisco.com> Change-Id: Icb5db6f69eda93181aba69b1f8676a73c0a4561b
Diffstat (limited to 'extras/hs-test/proxy_test.go')
-rwxr-xr-xextras/hs-test/proxy_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/hs-test/proxy_test.go b/extras/hs-test/proxy_test.go
index 797de5255fa..d426b61a33f 100755
--- a/extras/hs-test/proxy_test.go
+++ b/extras/hs-test/proxy_test.go
@@ -9,7 +9,7 @@ import (
"github.com/edwarnicke/exechelper"
)
-func testProxyHttpTcp(t *testing.T, dockerInstance string, proxySetup func() error) error {
+func testProxyHttpTcp(t *testing.T, dockerInstance, action string, proxySetup func() error) error {
const outputFile = "test.data"
const srcFile = "10M"
stopServer := make(chan struct{}, 1)
@@ -23,7 +23,7 @@ func testProxyHttpTcp(t *testing.T, dockerInstance string, proxySetup func() err
defer func() { exechelper.Run("docker stop " + dockerInstance) }()
// start & configure vpp in the container
- _, err = hstExec(dockerInstance, dockerInstance)
+ _, err = hstExec(action, dockerInstance)
if err != nil {
return fmt.Errorf("error starting vpp in container: %v", err)
}
@@ -72,7 +72,7 @@ func testProxyHttpTcp(t *testing.T, dockerInstance string, proxySetup func() err
func (s *NsSuite) TestVppProxyHttpTcp() {
t := s.T()
dockerInstance := "vpp-proxy"
- err := testProxyHttpTcp(t, dockerInstance, configureVppProxy)
+ err := testProxyHttpTcp(t, dockerInstance, "ConfigureVppProxy", configureVppProxy)
if err != nil {
t.Errorf("%v", err)
}
@@ -88,7 +88,7 @@ func (s *NsSuite) TestEnvoyProxyHttpTcp() {
ctx, cancel := context.WithCancel(context.Background())
dockerInstance := "vpp-envoy"
- err := testProxyHttpTcp(t, dockerInstance, func() error {
+ err := testProxyHttpTcp(t, dockerInstance, "ConfigureEnvoyProxy", func() error {
return setupEnvoy(t, ctx, dockerInstance)
})
if err != nil {