Skip to content

Commit

Permalink
fix: typo in upstream pass host (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzp2010 authored Jan 9, 2024
1 parent 29f2570 commit 1398493
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/pkg/openapi2apisix/openapi2apisix.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func createUpstream(targets []*url.URL, varUris []string) *apitypes.Upstream {
Send: 60,
Read: 60,
},
PassHost: apitypes.UpstreamPassHost,
PassHost: apitypes.UpstreamPassHostPass,
}

return &upstream
Expand Down
8 changes: 4 additions & 4 deletions internal/pkg/openapi2apisix/openapi2apisix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func TestConvert(t *testing.T) {
Send: 60,
Read: 60,
},
PassHost: "host",
PassHost: apitypes.UpstreamPassHostPass,
},
// Labels: make([]apitypes.Labels, 0),
},
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestConvert(t *testing.T) {
Send: 60,
Read: 60,
},
PassHost: "host",
PassHost: apitypes.UpstreamPassHostPass,
},
// Labels: make([]apitypes.Labels, 0),
},
Expand Down Expand Up @@ -232,7 +232,7 @@ func TestConvert(t *testing.T) {
Send: 60,
Read: 60,
},
PassHost: "host",
PassHost: apitypes.UpstreamPassHostPass,
},
// Labels: apitypes.Labels{
// "web-spider", "blockchain",
Expand Down Expand Up @@ -275,7 +275,7 @@ func TestConvert(t *testing.T) {
Send: 60,
Read: 60,
},
PassHost: "host",
PassHost: apitypes.UpstreamPassHostPass,
},
// Labels: []apitypes.Labels{
// "web-spider", "blockchain",
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/apisix/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ func (c *ConsumerGroup) SetLabel(k, v string) {
}

const (
UpstreamPassHost = "host"
UpstreamPassHostPass = "pass"
)

type PluginMetadata struct {
Expand Down

0 comments on commit 1398493

Please sign in to comment.