Skip to content

Commit

Permalink
test: check YTSAURUS_ENABLE_E2E_TESTS on ginkgo level
Browse files Browse the repository at this point in the history
Otherwise there is no output for skipped test when run by ginkgo.
  • Loading branch information
koct9i committed Nov 7, 2024
1 parent 2dde8de commit 929d49e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/e2e/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,17 @@ var ctx context.Context
var log = logf.Log

func TestAPIs(t *testing.T) {
if os.Getenv("YTSAURUS_ENABLE_E2E_TESTS") != "true" {
t.Skip("skipping E2E tests: set YTSAURUS_ENABLE_E2E_TESTS environment variable to 'true'")
}

RegisterFailHandler(Fail)
RunSpecs(t, "Controller Suite")
}

var _ = SynchronizedBeforeSuite(func(ctx context.Context) []byte {
logf.SetLogger(zap.New(zap.WriteTo(GinkgoWriter), zap.UseDevMode(true)))

if os.Getenv("YTSAURUS_ENABLE_E2E_TESTS") != "true" {
Skip("skipping E2E tests: set YTSAURUS_ENABLE_E2E_TESTS environment variable to 'true'")
}

By("bootstrapping test environment")
cfg, err := config.GetConfig()
Expect(err).NotTo(HaveOccurred())
Expand Down

0 comments on commit 929d49e

Please sign in to comment.