Skip to content
This repository was archived by the owner on Apr 30, 2025. It is now read-only.

Commit e3d7611

Browse files
MarcPaquetteameowlia
authored andcommitted
Fix issues introduce when updating zap
1 parent ec6d861 commit e3d7611

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ type RoutingApiConfig struct {
152152

153153
type OAuthConfig struct {
154154
TokenEndpoint string `yaml:"token_endpoint"`
155-
Port int `yaml:"port"`
155+
Port uint16 `yaml:"port"`
156156
SkipSSLValidation bool `yaml:"skip_ssl_validation"`
157157
ClientName string `yaml:"client_name"`
158158
ClientSecret string `yaml:"client_secret"`

config/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ oauth:
654654
Expect(err).ToNot(HaveOccurred())
655655

656656
Expect(config.OAuth.TokenEndpoint).To(Equal("uaa.internal"))
657-
Expect(config.OAuth.Port).To(Equal(int(8443)))
657+
Expect(config.OAuth.Port).To(Equal(uint16(8443)))
658658
Expect(config.OAuth.SkipSSLValidation).To(Equal(true))
659659
Expect(config.OAuth.ClientName).To(Equal("client-name"))
660660
Expect(config.OAuth.ClientSecret).To(Equal("client-secret"))

integration/main_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ var _ = Describe("Router Integration", func() {
11151115

11161116
Context("when tls for uaa is disabled", func() {
11171117
It("fails fast", func() {
1118-
cfg.OAuth.Port = -1
1118+
cfg.OAuth.Port = 0
11191119
writeConfig(cfg, cfgFile)
11201120

11211121
gorouterCmd := exec.Command(gorouterPath, "-c", cfgFile)
@@ -1433,12 +1433,12 @@ func uriAndPort(url string) (string, int) {
14331433
return uri, port
14341434
}
14351435

1436-
func hostnameAndPort(url string) (string, int) {
1436+
func hostnameAndPort(url string) (string, uint16) {
14371437
parts := strings.Split(url, ":")
14381438
hostname := parts[0]
14391439
port, err := strconv.ParseUint(parts[1], 10, 16)
14401440
Expect(err).ToNot(HaveOccurred())
1441-
return hostname, int(port)
1441+
return hostname, uint16(port)
14421442
}
14431443

14441444
func newMessageBus(c *config.Config) (*nats.Conn, error) {

0 commit comments

Comments
 (0)