Skip to content

Commit

Permalink
Remove async behavior of BeforeSuite
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <vincepri@vmware.com>
  • Loading branch information
vincepri committed Jan 19, 2021
1 parent 96c1664 commit d9d0c55
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions bootstrap/kubeadm/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestAPIs(t *testing.T) {
[]Reporter{printer.NewlineReporter{}})
}

var _ = BeforeSuite(func(done Done) {
var _ = BeforeSuite(func() {
By("bootstrapping test environment")
testEnv = helpers.NewTestEnvironment()

Expand All @@ -55,7 +55,6 @@ var _ = BeforeSuite(func(done Done) {
}()

<-testEnv.Manager.Elected()
close(done)
}, 60)

var _ = AfterSuite(func() {
Expand Down
3 changes: 1 addition & 2 deletions controllers/remote/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestGinkgoSuite(t *testing.T) {
[]Reporter{printer.NewlineReporter{}})
}

var _ = BeforeSuite(func(done Done) {
var _ = BeforeSuite(func() {
By("bootstrapping test environment")
testEnv = helpers.NewTestEnvironment()

Expand All @@ -60,7 +60,6 @@ var _ = BeforeSuite(func(done Done) {
}()

<-testEnv.Manager.Elected()
close(done)
}, 60)

var _ = AfterSuite(func() {
Expand Down
3 changes: 1 addition & 2 deletions exp/addons/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func TestAPIs(t *testing.T) {
[]Reporter{printer.NewlineReporter{}})
}

var _ = BeforeSuite(func(done Done) {
var _ = BeforeSuite(func() {
By("bootstrapping test environment")
testEnv = helpers.NewTestEnvironment()
trckr, err := remote.NewClusterCacheTracker(log.NullLogger{}, testEnv.Manager)
Expand All @@ -67,7 +67,6 @@ var _ = BeforeSuite(func(done Done) {
}()

<-testEnv.Manager.Elected()
close(done)
}, 60)

var _ = AfterSuite(func() {
Expand Down
3 changes: 1 addition & 2 deletions exp/controllers/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func TestAPIs(t *testing.T) {
[]Reporter{printer.NewlineReporter{}})
}

var _ = BeforeSuite(func(done Done) {
var _ = BeforeSuite(func() {
By("bootstrapping test environment")
testEnv = helpers.NewTestEnvironment()

Expand All @@ -61,7 +61,6 @@ var _ = BeforeSuite(func(done Done) {
}()

<-testEnv.Manager.Elected()
close(done)
}, 60)

var _ = AfterSuite(func() {
Expand Down
3 changes: 1 addition & 2 deletions util/patch/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestPatch(t *testing.T) {
[]Reporter{printer.NewlineReporter{}})
}

var _ = BeforeSuite(func(done Done) {
var _ = BeforeSuite(func() {
By("bootstrapping test environment")
testEnv = helpers.NewTestEnvironment()

Expand All @@ -60,7 +60,6 @@ var _ = BeforeSuite(func(done Done) {
}()

<-testEnv.Manager.Elected()
close(done)
}, 60)

var _ = AfterSuite(func() {
Expand Down

0 comments on commit d9d0c55

Please sign in to comment.