Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dep: bump gopkg.in/yaml to v3 #436

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

"code.cloudfoundry.org/gorouter/logger"
"github.com/uber-go/zap"
"gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

"code.cloudfoundry.org/localip"
"slices"
Expand Down
17 changes: 7 additions & 10 deletions config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (

"code.cloudfoundry.org/gorouter/test_util"

yaml "gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"
)

var _ = Describe("Config", func() {
Expand Down Expand Up @@ -1906,18 +1906,15 @@ load_balancer_healthy_threshold: 10s

Describe("Timeout", func() {
var b []byte
BeforeEach(func() {
b = createYMLSnippet((cfgForSnippet))
})
It("converts timeouts to a duration", func() {
b = append(b, []byte(`
b = []byte(`
endpoint_timeout: 10s
endpoint_dial_timeout: 6s
websocket_dial_timeout: 8s
route_services_timeout: 10s
drain_timeout: 15s
tls_handshake_timeout: 9s
`)...)
`)
err := config.Initialize(b)
Expect(err).ToNot(HaveOccurred())

Expand All @@ -1932,9 +1929,9 @@ tls_handshake_timeout: 9s
})

It("defaults to the EndpointTimeout when not set", func() {
b = append(b, []byte(`
b = []byte(`
endpoint_timeout: 10s
`)...)
`)
err := config.Initialize(b)
Expect(err).ToNot(HaveOccurred())

Expand All @@ -1946,11 +1943,11 @@ endpoint_timeout: 10s
})

It("lets drain_timeout be 60 if it wants", func() {
b = append(b, []byte(`
b = []byte(`
endpoint_timeout: 10s
route_services_timeout: 11s
drain_timeout: 60s
`)...)
`)
err := config.Initialize(b)
Expect(err).ToNot(HaveOccurred())

Expand Down
2 changes: 1 addition & 1 deletion integration/common_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"code.cloudfoundry.org/gorouter/test_util"

nats "github.com/nats-io/nats.go"
yaml "gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down
2 changes: 1 addition & 1 deletion integration/test_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"code.cloudfoundry.org/gorouter/config"
"code.cloudfoundry.org/gorouter/test_util"

yaml "gopkg.in/yaml.v2"
"gopkg.in/yaml.v3"

. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
Expand Down