Enabled incorrectly skipped tests (#1280)

## Changes
Some integration tests were missing `TestAcc` prefix therefore were
skipped.

## Tests
Running integration tests
This commit is contained in:
Andrew Nester 2024-03-14 13:56:21 +01:00 committed by GitHub
parent 5f29b5ecd9
commit e22dd8af7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 10 deletions

View File

@ -43,7 +43,7 @@ func createTemporaryRepo(t *testing.T, w *databricks.WorkspaceClient, ctx contex
return repoInfo.Id, repoPath
}
func TestReposCreateWithProvider(t *testing.T) {
func TestAccReposCreateWithProvider(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()
@ -60,7 +60,7 @@ func TestReposCreateWithProvider(t *testing.T) {
assert.Equal(t, workspace.ObjectTypeRepo, oi.ObjectType)
}
func TestReposCreateWithoutProvider(t *testing.T) {
func TestAccReposCreateWithoutProvider(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()
@ -77,7 +77,7 @@ func TestReposCreateWithoutProvider(t *testing.T) {
assert.Equal(t, workspace.ObjectTypeRepo, oi.ObjectType)
}
func TestReposGet(t *testing.T) {
func TestAccReposGet(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()
@ -106,7 +106,7 @@ func TestReposGet(t *testing.T) {
assert.ErrorContains(t, err, "is not a repo")
}
func TestReposUpdate(t *testing.T) {
func TestAccReposUpdate(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()
@ -127,7 +127,7 @@ func TestReposUpdate(t *testing.T) {
assert.Equal(t, byIdOutput.String(), byPathOutput.String())
}
func TestReposDeleteByID(t *testing.T) {
func TestAccReposDeleteByID(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()
@ -146,7 +146,7 @@ func TestReposDeleteByID(t *testing.T) {
assert.True(t, apierr.IsMissing(err), err)
}
func TestReposDeleteByPath(t *testing.T) {
func TestAccReposDeleteByPath(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()

View File

@ -61,7 +61,7 @@ func assertSecretBytesValue(t *acc.WorkspaceT, scope, key string, expected []byt
assert.Equal(t, expected, decoded)
}
func TestSecretsPutSecretStringValue(tt *testing.T) {
func TestAccSecretsPutSecretStringValue(tt *testing.T) {
ctx, t := acc.WorkspaceTest(tt)
scope := temporarySecretScope(ctx, t)
key := "test-key"
@ -75,7 +75,7 @@ func TestSecretsPutSecretStringValue(tt *testing.T) {
assertSecretBytesValue(t, scope, key, []byte(value))
}
func TestSecretsPutSecretBytesValue(tt *testing.T) {
func TestAccSecretsPutSecretBytesValue(tt *testing.T) {
ctx, t := acc.WorkspaceTest(tt)
scope := temporarySecretScope(ctx, t)
key := "test-key"

View File

@ -7,8 +7,12 @@ import (
"github.com/stretchr/testify/assert"
)
func TestStorageCredentialsListRendersResponse(t *testing.T) {
func TestAccStorageCredentialsListRendersResponse(t *testing.T) {
_, _ = acc.WorkspaceTest(t)
// Check if metastore is assigned for the workspace, otherwise test will fail
t.Log(GetEnvOrSkipTest(t, "TEST_METASTORE_ID"))
stdout, stderr := RequireSuccessfulRun(t, "storage-credentials", "list")
assert.NotEmpty(t, stdout)
assert.Empty(t, stderr)

View File

@ -42,7 +42,7 @@ func TestWorkpaceGetStatusErrorWhenNoArguments(t *testing.T) {
assert.Contains(t, err.Error(), "accepts 1 arg(s), received 0")
}
func TestWorkpaceExportPrintsContents(t *testing.T) {
func TestAccWorkpaceExportPrintsContents(t *testing.T) {
t.Log(GetEnvOrSkipTest(t, "CLOUD_ENV"))
ctx := context.Background()