Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Ling Samuel (WSL) <[email protected]>
  • Loading branch information
lingsamuel committed Oct 19, 2023
1 parent 3446b5a commit 5fe6681
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions cmd/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ func saveConfiguration(cmd *cobra.Command) error {
color.Yellow("APISIX address " + rootConfig.Server + " is configured without protocol, using HTTP")
rootConfig.Server = "http://" + rootConfig.Server
}
if strings.HasSuffix(rootConfig.Server, "/") {
rootConfig.Server = strings.TrimSuffix(rootConfig.Server, "/")
}
rootConfig.Server = strings.TrimSuffix(rootConfig.Server, "/")

_, err = url.Parse(rootConfig.Server)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion test/cli/suites-basic/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var _ = ginkgo.Describe("`adc ping` tests", func() {
ginkgo.It("should connect to APISIX", func() {
output, err := s.Ping()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(output).To(gomega.Equal("Connected to APISIX successfully!\n"))
gomega.Expect(output).To(gomega.Equal("Connected to backend successfully!\n"))
})
})
})
2 changes: 1 addition & 1 deletion test/mtls/suites-basic/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var _ = ginkgo.Describe("`adc ping` tests", func() {
ginkgo.It("should connect to APISIX", func() {
output, err := s.Ping()
gomega.Expect(err).To(gomega.BeNil())
gomega.Expect(output).To(gomega.Equal("Connected to APISIX successfully!\n"))
gomega.Expect(output).To(gomega.Equal("Connected to backend successfully!\n"))
})
})
})

0 comments on commit 5fe6681

Please sign in to comment.