diff --git a/cmd/auth/profiles.go b/cmd/auth/profiles.go index 7c4a7ab2..5ebea444 100644 --- a/cmd/auth/profiles.go +++ b/cmd/auth/profiles.go @@ -3,7 +3,6 @@ package auth import ( "context" "fmt" - "net/http" "os" "sync" "time" @@ -45,13 +44,7 @@ func (c *profileMetadata) Load(ctx context.Context, skipValidate bool) { } if skipValidate { - err := cfg.Authenticate(&http.Request{ - Header: make(http.Header), - }) - if err != nil { - return - } - c.Host = cfg.Host + c.Host = cfg.CanonicalHostName() c.AuthType = cfg.AuthType return } diff --git a/cmd/auth/profiles_test.go b/cmd/auth/profiles_test.go index c1971705..8a667a6d 100644 --- a/cmd/auth/profiles_test.go +++ b/cmd/auth/profiles_test.go @@ -21,8 +21,9 @@ func TestProfiles(t *testing.T) { err := databrickscfg.SaveToProfile(ctx, &config.Config{ ConfigFile: configFile, Profile: "profile1", - Host: "https://abc.cloud.databricks.com", + Host: "abc.cloud.databricks.com", Token: "token1", + AuthType: "pat", }) require.NoError(t, err)