Skip to content

Commit

Permalink
Convert to ginkgo v2
Browse files Browse the repository at this point in the history
  • Loading branch information
geofffranks committed Apr 5, 2023
1 parent 8ff8fd8 commit aa72ec8
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ the repo and change directory to `src/code.cloudfoundry.org`

1. Install the ginkgo binary with `go get`:
```bash
go get github.com/onsi/ginkgo/ginkgo
go get github.com/onsi/ginkgo/v2/ginkgo
```

1. Run tests, by running the following command from root of this repository
Expand Down
2 changes: 1 addition & 1 deletion commandrunner/commandrunner_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package commandrunner_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"testing"
Expand Down
3 changes: 1 addition & 2 deletions commandrunner/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"code.cloudfoundry.org/route-registrar/commandrunner"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"

Expand Down Expand Up @@ -54,7 +54,6 @@ var _ = Describe("CommandRunner", func() {
tmpGoPkgPath, err = ioutil.TempDir(filepath.Join(gopath, "src", "code.cloudfoundry.org"), "tmp-foo")
Expect(err).NotTo(HaveOccurred())


outbuf = bytes.Buffer{}
errbuf = bytes.Buffer{}
})
Expand Down
2 changes: 1 addition & 1 deletion config/config_suite_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package config_test

import (
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"testing"
Expand Down
2 changes: 1 addition & 1 deletion config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"code.cloudfoundry.org/route-registrar/config"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
)
Expand Down
2 changes: 1 addition & 1 deletion healthchecker/healthchecker_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package healthchecker_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion healthchecker/script_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

"code.cloudfoundry.org/route-registrar/commandrunner/fakes"
"code.cloudfoundry.org/route-registrar/healthchecker"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"

Expand Down
2 changes: 1 addition & 1 deletion integration/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"path/filepath"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gexec"

Expand Down
2 changes: 1 addition & 1 deletion integration/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/onsi/gomega/gbytes"
"github.com/onsi/gomega/gexec"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion integration/tcp_route_registration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/onsi/gomega/gexec"
"github.com/onsi/gomega/ghttp"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
5 changes: 2 additions & 3 deletions messagebus/messagebus_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package messagebus_test
import (
"testing"

. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand All @@ -19,5 +18,5 @@ func TestMessagebus(t *testing.T) {
}

var _ = BeforeSuite(func() {
natsPort = 20000 + config.GinkgoConfig.ParallelNode
natsPort = 20000 + GinkgoParallelNode()
})
2 changes: 1 addition & 1 deletion messagebus/messagebus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strconv"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"

Expand Down
5 changes: 2 additions & 3 deletions registrar/registrar_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package registrar_test
import (
"testing"

. "github.com/onsi/ginkgo"
"github.com/onsi/ginkgo/config"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand All @@ -19,5 +18,5 @@ func TestRoute_register(t *testing.T) {
}

var _ = BeforeSuite(func() {
natsPort = 40000 + config.GinkgoConfig.ParallelNode
natsPort = 40000 + GinkgoParallelNode()
})
2 changes: 1 addition & 1 deletion registrar/registrar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/nats-io/nats.go"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

tls_helpers "code.cloudfoundry.org/cf-routing-test-helpers/tls"
Expand Down
2 changes: 1 addition & 1 deletion routingapi/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package routingapi
import (
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"golang.org/x/oauth2"

Expand Down
2 changes: 1 addition & 1 deletion routingapi/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package routingapi_test
import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)

Expand Down
2 changes: 1 addition & 1 deletion routingapi/routingapi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"errors"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"golang.org/x/oauth2"

Expand Down

0 comments on commit aa72ec8

Please sign in to comment.