Skip to content

Commit

Permalink
Add platform region to e2e tests (#3150)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarekMichali authored Nov 3, 2023
1 parent a2d18af commit 23e6661
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions tests/e2e/provisioning/pkg/client/broker/broker_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ import (
)

type Config struct {
ClientName string
ClientID string
ClientSecret string
Scope string `envconfig:"default=broker:write"`
TokenURL string
URL string
PlanID string
Region string
ClientName string
ClientID string
ClientSecret string
Scope string `envconfig:"default=broker:write"`
TokenURL string
URL string
PlanID string
Region string
PlatformRegion string `envconfig:"optional"`
}

type BrokerOAuthConfig struct {
Expand Down Expand Up @@ -407,8 +408,8 @@ func (c *Client) warnOnError(do func() error) {

func (c *Client) baseURL() string {
base := fmt.Sprintf("%s/oauth", c.brokerConfig.URL)
if c.brokerConfig.Region == "" {
if c.brokerConfig.PlatformRegion == "" {
return fmt.Sprintf("%s/v2", base)
}
return fmt.Sprintf("%s/%s/v2", base, c.brokerConfig.Region)
return fmt.Sprintf("%s/%s/v2", base, c.brokerConfig.PlatformRegion)
}

0 comments on commit 23e6661

Please sign in to comment.