hs-test: add nginx+quic test
[vpp.git] / extras / hs-test / hst_suite.go
index d972c9d..093bca0 100644 (file)
@@ -4,6 +4,8 @@ import (
        "flag"
        "io/ioutil"
        "os"
+       "os/exec"
+       "strings"
        "time"
 
        "github.com/edwarnicke/exechelper"
@@ -162,6 +164,20 @@ func (s *HstSuite) SkipIfMultiWorker(args ...any) {
        }
 }
 
+func (s *HstSuite) SkipUnlessExtendedTestsBuilt() {
+       imageName := "hs-test/nginx-http3"
+
+       cmd := exec.Command("docker", "images", imageName)
+       byteOutput, err := cmd.CombinedOutput()
+       if err != nil {
+               s.log("error while searching for docker image")
+               return
+       }
+       if !strings.Contains(string(byteOutput), imageName) {
+               s.skip("extended tests not built")
+       }
+}
+
 func (s *HstSuite) resetContainers() {
        for _, container := range s.containers {
                container.stop()