Skip to content

Commit

Permalink
Upgrade to Ginkgo V2
Browse files Browse the repository at this point in the history
  • Loading branch information
rgalanakis committed Oct 19, 2022
1 parent 8437727 commit bda13fc
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 55 deletions.
2 changes: 1 addition & 1 deletion data_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package sashay_test

import (
"fmt"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rgalanakis/sashay"
)
Expand Down
2 changes: 1 addition & 1 deletion field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package sashay_test

import (
"fmt"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rgalanakis/sashay"
"reflect"
Expand Down
14 changes: 7 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ module github.com/rgalanakis/sashay
go 1.19

require (
github.com/onsi/ginkgo v1.4.0
github.com/onsi/gomega v1.3.0
github.com/onsi/ginkgo/v2 v2.3.1
github.com/onsi/gomega v1.22.0
)

require (
github.com/golang/protobuf v1.5.2 // indirect
golang.org/x/net v0.0.0-20180415214307-500e7a4f953d // indirect
golang.org/x/sys v0.0.0-20180414092825-2281fa97ef7b // indirect
golang.org/x/text v0.3.0 // indirect
gopkg.in/yaml.v2 v2.2.1 // indirect
github.com/google/go-cmp v0.5.8 // indirect
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
34 changes: 15 additions & 19 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/onsi/ginkgo v1.4.0 h1:n60/4GZK0Sr9O2iuGKq876Aoa0ER2ydgpMOBwzJ8e2c=
github.com/onsi/ginkgo v1.4.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.3.0 h1:yPHEatyQC4jN3vdfvqJXG7O9vfC6LhaAV1NEdYpP+h0=
github.com/onsi/gomega v1.3.0/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA=
golang.org/x/net v0.0.0-20180415214307-500e7a4f953d h1:YbPBOQdSo5fFDiZgBDcltE4XjtOLk2wUw16mtGFpoOg=
golang.org/x/net v0.0.0-20180415214307-500e7a4f953d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/sys v0.0.0-20180414092825-2281fa97ef7b h1:TZPu90il0Pa3zEX8+9qApAIAo9nGKe3ZzQCfYS1y/Ic=
golang.org/x/sys v0.0.0-20180414092825-2281fa97ef7b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/onsi/ginkgo/v2 v2.3.1 h1:8SbseP7qM32WcvE6VaN6vfXxv698izmsJ1UQX9ve7T8=
github.com/onsi/ginkgo/v2 v2.3.1/go.mod h1:Sv4yQXwG5VmF7tm3Q5Z+RWUpPo24LF1mpnz2crUb8Ys=
github.com/onsi/gomega v1.22.0 h1:AIg2/OntwkBiCg5Tt1ayyiF1ArFrWFoCSMtMi/wdApk=
github.com/onsi/gomega v1.22.0/go.mod h1:iYAIXgPSaDHak0LCMA+AWBpIKBr8WZicMxnE8luStNc=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
12 changes: 2 additions & 10 deletions internal_test.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
package sashay

import (
"reflect"
"testing"

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

func TestSwaggerInternals(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Swagger internals test Suite")
}

var _ = Describe("Swagger internals test", func() {

Describe("jsonName", func() {
type Tester struct {
Dash int `json:"-"`
Expand Down
4 changes: 1 addition & 3 deletions petstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ package sashay_test

import (
"fmt"

"github.com/rgalanakis/sashay"
"io/ioutil"
"net/http"
"os"

"github.com/rgalanakis/sashay"
)

// Stand-in for whatever HTTP framework you are using
Expand Down
11 changes: 5 additions & 6 deletions sashay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@ package sashay_test

import (
"bytes"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rgalanakis/sashay"
"io/ioutil"
"math/rand"
"os"
"strings"
"testing"
"time"

. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/rgalanakis/sashay"
)

func TestSwagger(t *testing.T) {
func TestSashay(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "SwaggerGen Suite")
RunSpecs(t, "Sashay Suite")
}

type User struct {
Expand Down
9 changes: 1 addition & 8 deletions validator_data_typer_test.go
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
package sashay_test

import (
"testing"

. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/rgalanakis/sashay"
"reflect"
"strings"
)

func TestValidatorDataTyper(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "ValidatorDataTyper Suite")
}

// RegisterValidatorDataTypes registers override DataTypers for all builtin data types.
func RegisterValidatorDataTypes(sa *sashay.Sashay) {
for _, v := range sashay.BuiltinDataTypeValues {
Expand Down

0 comments on commit bda13fc

Please sign in to comment.