From 98a91e82608e6e30d4516b52556cdaaa9837ee24 Mon Sep 17 00:00:00 2001 From: Maros Ondrejicka Date: Tue, 6 Dec 2022 15:38:05 +0100 Subject: hs-test: use assert-like approach in test cases Type: test Signed-off-by: Maros Ondrejicka Change-Id: I1653001461d4dfc52f1fb3a9e0cf458a506b8324 --- extras/hs-test/utils.go | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'extras/hs-test/utils.go') diff --git a/extras/hs-test/utils.go b/extras/hs-test/utils.go index 4dda4e462b0..581b8461082 100755 --- a/extras/hs-test/utils.go +++ b/extras/hs-test/utils.go @@ -10,7 +10,6 @@ import ( "os" "os/exec" "strings" - "testing" "time" "github.com/edwarnicke/exechelper" @@ -249,32 +248,6 @@ func startEnvoy(ctx context.Context, dockerInstance string) <-chan error { return errCh } -func setupEnvoy(t *testing.T, ctx context.Context, dockerInstance string) error { - errCh := startEnvoy(ctx, dockerInstance) - select { - case err := <-errCh: - return err - default: - } - - go func(ctx context.Context, errCh <-chan error) { - for { - select { - // handle cancel() call from outside to gracefully stop the routine - case <-ctx.Done(): - return - default: - select { - case err := <-errCh: - fmt.Printf("error while running envoy: %v", err) - default: - } - } - } - }(ctx, errCh) - return nil -} - func configureVppProxy() error { _, err := dockerExec("vppctl test proxy server server-uri tcp://10.0.0.2/555 client-uri tcp://10.0.1.1/666", "vpp-proxy") -- cgit 1.2.3-korg