diff --git a/config/config.go b/config/config.go index 6c14f0a27..363201d69 100644 --- a/config/config.go +++ b/config/config.go @@ -282,6 +282,8 @@ func (c *Config) IsAccountClient() bool { accountsPrefixes := []string{ "https://accounts.", "https://accounts-dod.", + "accounts.", + "accounts-dod.", } for _, prefix := range accountsPrefixes { if strings.HasPrefix(c.Host, prefix) { diff --git a/config/config_test.go b/config/config_test.go index 5a5ac7041..559d1ec57 100644 --- a/config/config_test.go +++ b/config/config_test.go @@ -19,6 +19,22 @@ func TestIsAccountClient_AwsAccount(t *testing.T) { assert.True(t, c.IsAccountClient()) } +func TestIsAccountClient_WithoutHTTPSInHost_AWSAccount(t *testing.T) { + c := &Config{ + Host: "accounts.cloud.databricks.com", + AccountID: "123e4567-e89b-12d3-a456-426614174000", + } + assert.True(t, c.IsAccountClient()) +} + +func TestIsAccountClient_WithoutHTTPSInHost_AwsDodAccount(t *testing.T) { + c := &Config{ + Host: "accounts-dod.cloud.databricks.us", + AccountID: "123e4567-e89b-12d3-a456-426614174000", + } + assert.True(t, c.IsAccountClient()) +} + func TestIsAccountClient_AwsDodAccount(t *testing.T) { c := &Config{ Host: "https://accounts-dod.cloud.databricks.us",