github.com/kubeshop/testkube@v1.17.23/contrib/executor/ginkgo/examples/e2e/e2e_suite_test.go (about)

     1  package e2e
     2  
     3  import (
     4  	"flag"
     5  	"testing"
     6  
     7  	. "github.com/onsi/ginkgo/v2"
     8  	. "github.com/onsi/gomega"
     9  )
    10  
    11  var baseURL string
    12  
    13  // Register your flags in an init function.  This ensures they are registered _before_ `go test` calls flag.Parse().
    14  func init() {
    15  	flag.StringVar(&baseURL, "base-url", "", "Url of the server to test")
    16  }
    17  func TestE2e(t *testing.T) {
    18  	RegisterFailHandler(Fail)
    19  	if baseURL == "" {
    20  		baseURL = "google.com"
    21  	}
    22  	RunSpecs(t, "E2E Integration Testing Suite")
    23  }