Skip to content

Commit

Permalink
Ginkgo v2 additional changes (#2832)
Browse files Browse the repository at this point in the history
Update deprecated v1 calls to use v2
  • Loading branch information
gururajsh authored Mar 27, 2024
1 parent b4dad05 commit cc638bf
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions integration/shared/experimental/experimental_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {

return nil
}, func(_ []byte) {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
// Ginkgo Globals
SetDefaultEventuallyTimeout(CFEventuallyTimeout)
SetDefaultConsistentlyDuration(CFConsistentlyTimeout)
Expand All @@ -54,16 +54,16 @@ var _ = SynchronizedBeforeSuite(func() []byte {
// Enable Experimental Flag
helpers.TurnOnExperimental()

GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
})

var _ = SynchronizedAfterSuite(func() {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized After Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized After Each==============================", GinkgoParallelProcess())))
suiteHomeDir := helpers.SetHomeDir()
helpers.SetAPI()
helpers.LoginCF()
helpers.DestroyHomeDir(suiteHomeDir)
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized After Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized After Each==============================", GinkgoParallelProcess())))
}, func() {})

var _ = BeforeEach(func() {
Expand Down
6 changes: 3 additions & 3 deletions integration/shared/global/global_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ var _ = SynchronizedBeforeSuite(func() []byte {
GinkgoWriter.Write([]byte("==============================End of Global FIRST Node Synchronized Before Each=============================="))
return nil
}, func(_ []byte) {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
if GinkgoParallelNode() != 1 {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
if GinkgoParallelProcess() != 1 {
Fail("Test suite cannot run in parallel")
}
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
})

var _ = BeforeEach(func() {
Expand Down
8 changes: 4 additions & 4 deletions integration/shared/performance/performance_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var _ = SynchronizedBeforeSuite(func() []byte {

return nil
}, func(_ []byte) {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
// Ginkgo Globals
SetDefaultEventuallyTimeout(CFEventuallyTimeout)
SetDefaultConsistentlyDuration(CFConsistentlyTimeout)
Expand All @@ -48,17 +48,17 @@ var _ = SynchronizedBeforeSuite(func() []byte {
helpers.TurnOffColors()
perfOrg, perfSpace = helpers.SetupReadOnlyOrgAndSpace()

GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
})

var _ = SynchronizedAfterSuite(func() {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized After Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized After Each==============================", GinkgoParallelProcess())))
homeDir = helpers.SetHomeDir()
helpers.SetAPI()
helpers.LoginCF()
helpers.QuickDeleteOrg(perfOrg)
helpers.DestroyHomeDir(homeDir)
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized After Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized After Each==============================", GinkgoParallelProcess())))
}, func() {})

var _ = BeforeEach(func() {
Expand Down
6 changes: 3 additions & 3 deletions integration/v7/global/global_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ var _ = SynchronizedBeforeSuite(func() []byte {
GinkgoWriter.Write([]byte("==============================End of Global FIRST Node Synchronized Before Each=============================="))
return nil
}, func(_ []byte) {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
if GinkgoParallelNode() != 1 {
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
if GinkgoParallelProcess() != 1 {
Fail("Test suite cannot run in parallel")
}
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelNode())))
GinkgoWriter.Write([]byte(fmt.Sprintf("==============================End of Global Node %d Synchronized Before Each==============================", GinkgoParallelProcess())))
})

var _ = BeforeEach(func() {
Expand Down
2 changes: 1 addition & 1 deletion integration/v7/isolated/app_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ applications:

BeforeEach(func() {
tcpDomain = helpers.NewDomain(orgName, helpers.NewDomainName("tcp"))
tcpDomain.CreateWithRouterGroup(helpers.FindOrCreateTCPRouterGroup(GinkgoParallelNode()))
tcpDomain.CreateWithRouterGroup(helpers.FindOrCreateTCPRouterGroup(GinkgoParallelProcess()))
helpers.WithHelloWorldApp(func(appDir string) {
manifestContents := []byte(fmt.Sprintf(`
---
Expand Down

0 comments on commit cc638bf

Please sign in to comment.