Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/auth_gcp_google_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (c GoogleDefaultCredentials) Configure(ctx context.Context, cfg *Config) (f
if err != nil {
return nil, err
}
if !cfg.IsAccountsClient() {
if !cfg.IsAccountClient() {
logger.Infof("Using Google Default Application Credentials for Workspace")
return refreshableVisitor(inner), nil
}
Expand Down
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ func (c *Config) IsAws() bool {
return !c.IsAzure() && !c.IsGcp()
}

// IsAws returns true if client is configured for Accounts API
func (c *Config) IsAccountsClient() bool {
// IsAccountClient returns true if client is configured for Accounts API
func (c *Config) IsAccountClient() bool {
return strings.HasPrefix(c.Host, "https://accounts.")
}

Expand Down
4 changes: 2 additions & 2 deletions internal/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
func TestAccDefaultCredentials(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
w := databricks.Must(databricks.NewWorkspaceClient())
if w.Config.IsAccountsClient() {
if w.Config.IsAccountClient() {
t.SkipNow()
}
ctx := context.Background()
Expand All @@ -37,7 +37,7 @@ func TestAccExplicitDatabricksCfg(t *testing.T) {
w := databricks.Must(databricks.NewWorkspaceClient(&databricks.Config{
Profile: GetEnvOrSkipTest(t, "DATABRICKS_CONFIG_PROFILE"),
}))
if w.Config.IsAccountsClient() {
if w.Config.IsAccountClient() {
t.SkipNow()
}
ctx := context.Background()
Expand Down
2 changes: 1 addition & 1 deletion internal/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func accountTest(t *testing.T) (context.Context, *databricks.AccountClient) {
if err != nil {
skipf(t)("error: %s", err)
}
if !cfg.IsAccountsClient() {
if !cfg.IsAccountClient() {
skipf(t)("Not in account env: %s/%s", cfg.AccountID, cfg.Host)
}
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
Expand Down