diff --git a/cmd/workspace/storage-credentials/overrides.go b/cmd/workspace/storage-credentials/overrides.go index 37c18ca6..affcdfec 100644 --- a/cmd/workspace/storage-credentials/overrides.go +++ b/cmd/workspace/storage-credentials/overrides.go @@ -8,7 +8,7 @@ import ( func listOverride(listCmd *cobra.Command) { listCmd.Annotations["template"] = cmdio.Heredoc(` {{header "ID"}} {{header "Name"}} {{header "Credentials"}} - {{range .}}{{.Id|green}} {{.Name|cyan}} {{if .AwsIamRole}}{{.AwsIamRole.RoleArn}}{{end}}{{if .AzureServicePrincipal}}{{.AzureServicePrincipal.ApplicationId}}{{end}}{{if .GcpServiceAccountKey}}{{.Email}}{{end}} + {{range .}}{{.Id|green}} {{.Name|cyan}} {{if .AwsIamRole}}{{.AwsIamRole.RoleArn}}{{end}}{{if .AzureServicePrincipal}}{{.AzureServicePrincipal.ApplicationId}}{{end}}{{if .DatabricksGcpServiceAccount}}{{.DatabricksGcpServiceAccount.Email}}{{end}} {{end}}`) } diff --git a/internal/storage_credentials_test.go b/internal/storage_credentials_test.go new file mode 100644 index 00000000..250ad339 --- /dev/null +++ b/internal/storage_credentials_test.go @@ -0,0 +1,15 @@ +package internal + +import ( + "testing" + + "github.com/databricks/cli/internal/acc" + "github.com/stretchr/testify/assert" +) + +func TestStorageCredentialsListRendersResponse(t *testing.T) { + _, _ = acc.WorkspaceTest(t) + stdout, stderr := RequireSuccessfulRun(t, "storage-credentials", "list") + assert.NotEmpty(t, stdout) + assert.Empty(t, stderr) +}