Skip to content

Commit

Permalink
provider: environments.FromEndpoint() no longer needs an environmen…
Browse files Browse the repository at this point in the history
…t name
  • Loading branch information
manicminer committed Apr 10, 2024
1 parent 06e2717 commit 47742f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/acceptance/testclient/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func Build(tenantId string) (*clients.Client, error) {
}

if metadataHost != "" {
if env, err = environments.FromEndpoint(ctx, fmt.Sprintf("https://%s", metadataHost), envName); err != nil {
if env, err = environments.FromEndpoint(ctx, fmt.Sprintf("https://%s", metadataHost)); err != nil {
return nil, fmt.Errorf("building test client: %+v", err)
}
} else if env, err = environments.FromName(envName); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/acceptance/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func GetAuthConfig(t *testing.T) *auth.Credentials {
)

if metadataHost != "" {
if env, err = environments.FromEndpoint(ctx, fmt.Sprintf("https://%s", metadataHost), envName); err != nil {
if env, err = environments.FromEndpoint(ctx, fmt.Sprintf("https://%s", metadataHost)); err != nil {
t.Fatalf("building test client: %+v", err)
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func providerConfigure(p *schema.Provider) schema.ConfigureContextFunc {
)

if metadataHost != "" {
if env, err = environments.FromEndpoint(ctx, fmt.Sprintf("https://%s", metadataHost), envName); err != nil {
if env, err = environments.FromEndpoint(ctx, fmt.Sprintf("https://%s", metadataHost)); err != nil {
return nil, pluginsdk.DiagFromErr(err)
}
} else if env, err = environments.FromName(envName); err != nil {
Expand Down

0 comments on commit 47742f0

Please sign in to comment.