Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove superfluous name prefix for integration tests #2012

Merged
merged 1 commit into from
Dec 13, 2024
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 integration/assumptions/dashboard_assumptions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

// Verify that importing a dashboard through the Workspace API retains the identity of the underying resource,
// as well as properties exclusively accessible through the dashboards API.
func TestAccDashboardAssumptions_WorkspaceImport(t *testing.T) {
func TestDashboardAssumptions_WorkspaceImport(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)

t.Parallel()
Expand Down
10 changes: 5 additions & 5 deletions integration/bundle/artifacts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func touchEmptyFile(t *testing.T, path string) {
f.Close()
}

func TestAccUploadArtifactFileToCorrectRemotePath(t *testing.T) {
func TestUploadArtifactFileToCorrectRemotePath(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
dir := t.TempDir()
whlPath := filepath.Join(dir, "dist", "test.whl")
Expand Down Expand Up @@ -95,7 +95,7 @@ func TestAccUploadArtifactFileToCorrectRemotePath(t *testing.T) {
)
}

func TestAccUploadArtifactFileToCorrectRemotePathWithEnvironments(t *testing.T) {
func TestUploadArtifactFileToCorrectRemotePathWithEnvironments(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
dir := t.TempDir()
whlPath := filepath.Join(dir, "dist", "test.whl")
Expand Down Expand Up @@ -159,7 +159,7 @@ func TestAccUploadArtifactFileToCorrectRemotePathWithEnvironments(t *testing.T)
)
}

func TestAccUploadArtifactFileToCorrectRemotePathForVolumes(t *testing.T) {
func TestUploadArtifactFileToCorrectRemotePathForVolumes(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)

if os.Getenv("TEST_METASTORE_ID") == "" {
Expand Down Expand Up @@ -228,7 +228,7 @@ func TestAccUploadArtifactFileToCorrectRemotePathForVolumes(t *testing.T) {
)
}

func TestAccUploadArtifactFileToVolumeThatDoesNotExist(t *testing.T) {
func TestUploadArtifactFileToVolumeThatDoesNotExist(t *testing.T) {
ctx, wt := acc.UcWorkspaceTest(t)
w := wt.W

Expand Down Expand Up @@ -265,7 +265,7 @@ func TestAccUploadArtifactFileToVolumeThatDoesNotExist(t *testing.T) {
assert.Equal(t, "", stderr.String())
}

func TestAccUploadArtifactToVolumeNotYetDeployed(t *testing.T) {
func TestUploadArtifactToVolumeNotYetDeployed(t *testing.T) {
ctx, wt := acc.UcWorkspaceTest(t)
w := wt.W

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccBasicBundleDeployWithFailOnActiveRuns(t *testing.T) {
func TestBasicBundleDeployWithFailOnActiveRuns(t *testing.T) {
ctx, _ := acc.WorkspaceTest(t)

nodeTypeId := testutil.GetCloud(t).NodeTypeID()
Expand Down
6 changes: 3 additions & 3 deletions integration/bundle/bind_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccBindJobToExistingJob(t *testing.T) {
func TestBindJobToExistingJob(t *testing.T) {
env := testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
t.Log(env)

Expand Down Expand Up @@ -81,7 +81,7 @@ func TestAccBindJobToExistingJob(t *testing.T) {
require.Contains(t, job.Settings.Tasks[0].SparkPythonTask.PythonFile, "hello_world.py")
}

func TestAccAbortBind(t *testing.T) {
func TestAbortBind(t *testing.T) {
env := testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
t.Log(env)

Expand Down Expand Up @@ -130,7 +130,7 @@ func TestAccAbortBind(t *testing.T) {
require.Contains(t, job.Settings.Tasks[0].NotebookTask.NotebookPath, "test")
}

func TestAccGenerateAndBind(t *testing.T) {
func TestGenerateAndBind(t *testing.T) {
env := testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
t.Log(env)

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/clusters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccDeployBundleWithCluster(t *testing.T) {
func TestDeployBundleWithCluster(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)

if testutil.IsAWSCloud(wt) {
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/dashboards_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccDashboards(t *testing.T) {
func TestDashboards(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)

warehouseID := testutil.GetEnvOrSkipTest(t, "TEST_DEFAULT_WAREHOUSE_ID")
Expand Down
12 changes: 6 additions & 6 deletions integration/bundle/deploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func setupUcSchemaBundle(t *testing.T, ctx context.Context, w *databricks.Worksp
return bundleRoot
}

func TestAccBundleDeployUcSchema(t *testing.T) {
func TestBundleDeployUcSchema(t *testing.T) {
ctx, wt := acc.UcWorkspaceTest(t)
w := wt.W

Expand All @@ -106,7 +106,7 @@ func TestAccBundleDeployUcSchema(t *testing.T) {
assert.Equal(t, "SCHEMA_DOES_NOT_EXIST", apiErr.ErrorCode)
}

func TestAccBundleDeployUcSchemaFailsWithoutAutoApprove(t *testing.T) {
func TestBundleDeployUcSchemaFailsWithoutAutoApprove(t *testing.T) {
ctx, wt := acc.UcWorkspaceTest(t)
w := wt.W

Expand All @@ -128,7 +128,7 @@ func TestAccBundleDeployUcSchemaFailsWithoutAutoApprove(t *testing.T) {
assert.Contains(t, stdout.String(), "the deployment requires destructive actions, but current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed")
}

func TestAccBundlePipelineDeleteWithoutAutoApprove(t *testing.T) {
func TestBundlePipelineDeleteWithoutAutoApprove(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
w := wt.W

Expand Down Expand Up @@ -176,7 +176,7 @@ properties such as the 'catalog' or 'storage' are changed:
assert.Contains(t, stdout.String(), "the deployment requires destructive actions, but current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed")
}

func TestAccBundlePipelineRecreateWithoutAutoApprove(t *testing.T) {
func TestBundlePipelineRecreateWithoutAutoApprove(t *testing.T) {
ctx, wt := acc.UcWorkspaceTest(t)
w := wt.W
uniqueId := uuid.New().String()
Expand Down Expand Up @@ -215,7 +215,7 @@ properties such as the 'catalog' or 'storage' are changed:
assert.Contains(t, stdout.String(), "the deployment requires destructive actions, but current console does not support prompting. Please specify --auto-approve if you would like to skip prompts and proceed")
}

func TestAccDeployBasicBundleLogs(t *testing.T) {
func TestDeployBasicBundleLogs(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)

nodeTypeId := testutil.GetCloud(t).NodeTypeID()
Expand Down Expand Up @@ -245,7 +245,7 @@ func TestAccDeployBasicBundleLogs(t *testing.T) {
assert.Equal(t, "", stdout)
}

func TestAccDeployUcVolume(t *testing.T) {
func TestDeployUcVolume(t *testing.T) {
ctx, wt := acc.UcWorkspaceTest(t)
w := wt.W

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deploy_then_remove_resources_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccBundleDeployThenRemoveResources(t *testing.T) {
func TestBundleDeployThenRemoveResources(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
w := wt.W

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deploy_to_shared_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccDeployBasicToSharedWorkspacePath(t *testing.T) {
func TestDeployBasicToSharedWorkspacePath(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)

nodeTypeId := testutil.GetCloud(t).NodeTypeID()
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/deployment_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccFilesAreSyncedCorrectlyWhenNoSnapshot(t *testing.T) {
func TestFilesAreSyncedCorrectlyWhenNoSnapshot(t *testing.T) {
env := testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
t.Log(env)

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/destroy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccBundleDestroy(t *testing.T) {
func TestBundleDestroy(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
w := wt.W

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/empty_bundle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccEmptyBundleDeploy(t *testing.T) {
func TestEmptyBundleDeploy(t *testing.T) {
ctx, _ := acc.WorkspaceTest(t)

// create empty bundle
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/environments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccPythonWheelTaskWithEnvironmentsDeployAndRun(t *testing.T) {
func TestPythonWheelTaskWithEnvironmentsDeployAndRun(t *testing.T) {
t.Skip("Skipping test until serveless is enabled")

ctx, _ := acc.WorkspaceTest(t)
Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/generate_job_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccGenerateFromExistingJobAndDeploy(t *testing.T) {
func TestGenerateFromExistingJobAndDeploy(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
gt := &generateJobTest{T: wt, w: wt.W}

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/generate_pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccGenerateFromExistingPipelineAndDeploy(t *testing.T) {
func TestGenerateFromExistingPipelineAndDeploy(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
gt := &generatePipelineTest{T: wt, w: wt.W}

Expand Down
6 changes: 3 additions & 3 deletions integration/bundle/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccBundleInitErrorOnUnknownFields(t *testing.T) {
func TestBundleInitErrorOnUnknownFields(t *testing.T) {
t.Log(testutil.GetEnvOrSkipTest(t, "CLOUD_ENV"))

tmpDir := t.TempDir()
Expand All @@ -39,7 +39,7 @@ func TestAccBundleInitErrorOnUnknownFields(t *testing.T) {
// 2. While rare and to be avoided if possible, the CLI reserves the right to
// make changes that can break the MLOps Stacks DAB. In which case we should
// skip this test until the MLOps Stacks DAB is updated to work again.
func TestAccBundleInitOnMlopsStacks(t *testing.T) {
func TestBundleInitOnMlopsStacks(t *testing.T) {
env := testutil.GetCloud(t).String()

tmpDir1 := t.TempDir()
Expand Down Expand Up @@ -101,7 +101,7 @@ func TestAccBundleInitOnMlopsStacks(t *testing.T) {
assert.Contains(t, job.Settings.Name, fmt.Sprintf("dev-%s-batch-inference-job", projectName))
}

func TestAccBundleInitHelpers(t *testing.T) {
func TestBundleInitHelpers(t *testing.T) {
env := testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
t.Log(env)

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/job_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccJobsMetadataFile(t *testing.T) {
func TestJobsMetadataFile(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
w := wt.W

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/local_state_staleness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccLocalStateStaleness(t *testing.T) {
func TestLocalStateStaleness(t *testing.T) {
ctx, wt := acc.WorkspaceTest(t)
w := wt.W

Expand Down
6 changes: 3 additions & 3 deletions integration/bundle/python_wheel_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ func runPythonWheelTest(t *testing.T, templateName, sparkVersion string, pythonW
require.Contains(t, out, "['my_test_code', 'param1', 'param2']")
}

func TestAccPythonWheelTaskDeployAndRunWithoutWrapper(t *testing.T) {
func TestPythonWheelTaskDeployAndRunWithoutWrapper(t *testing.T) {
runPythonWheelTest(t, "python_wheel_task", "13.3.x-snapshot-scala2.12", false)
}

func TestAccPythonWheelTaskDeployAndRunWithWrapper(t *testing.T) {
func TestPythonWheelTaskDeployAndRunWithWrapper(t *testing.T) {
runPythonWheelTest(t, "python_wheel_task", "12.2.x-scala2.12", true)
}

func TestAccPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) {
func TestPythonWheelTaskDeployAndRunOnInteractiveCluster(t *testing.T) {
_, wt := acc.WorkspaceTest(t)

if testutil.IsAWSCloud(wt) {
Expand Down
4 changes: 2 additions & 2 deletions integration/bundle/spark_jar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func runSparkJarTestFromWorkspace(t *testing.T, sparkVersion string) {
runSparkJarTestCommon(t, ctx, sparkVersion, "n/a")
}

func TestAccSparkJarTaskDeployAndRunOnVolumes(t *testing.T) {
func TestSparkJarTaskDeployAndRunOnVolumes(t *testing.T) {
testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
testutil.RequireJDK(t, context.Background(), "1.8.0")

Expand All @@ -75,7 +75,7 @@ func TestAccSparkJarTaskDeployAndRunOnVolumes(t *testing.T) {
}
}

func TestAccSparkJarTaskDeployAndRunOnWorkspace(t *testing.T) {
func TestSparkJarTaskDeployAndRunOnWorkspace(t *testing.T) {
testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
testutil.RequireJDK(t, context.Background(), "1.8.0")

Expand Down
2 changes: 1 addition & 1 deletion integration/bundle/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccBundleValidate(t *testing.T) {
func TestBundleValidate(t *testing.T) {
testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")

tmpDir := t.TempDir()
Expand Down
2 changes: 1 addition & 1 deletion integration/cmd/alerts/alerts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/stretchr/testify/assert"
)

func TestAccAlertsCreateErrWhenNoArguments(t *testing.T) {
func TestAlertsCreateErrWhenNoArguments(t *testing.T) {
t.Log(testutil.GetEnvOrSkipTest(t, "CLOUD_ENV"))

_, _, err := testcli.RequireErrorRun(t, "alerts-legacy", "create")
Expand Down
4 changes: 2 additions & 2 deletions integration/cmd/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/databricks/cli/internal/testutil"
)

func TestAccApiGet(t *testing.T) {
func TestApiGet(t *testing.T) {
t.Log(testutil.GetEnvOrSkipTest(t, "CLOUD_ENV"))

stdout, _ := testcli.RequireSuccessfulRun(t, "api", "get", "/api/2.0/preview/scim/v2/Me")
Expand All @@ -30,7 +30,7 @@ func TestAccApiGet(t *testing.T) {
assert.NotNil(t, out["id"])
}

func TestAccApiPost(t *testing.T) {
func TestApiPost(t *testing.T) {
env := testutil.GetEnvOrSkipTest(t, "CLOUD_ENV")
t.Log(env)
if env == "gcp" {
Expand Down
4 changes: 2 additions & 2 deletions integration/cmd/clusters/clusters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestAccClustersList(t *testing.T) {
func TestClustersList(t *testing.T) {
t.Log(testutil.GetEnvOrSkipTest(t, "CLOUD_ENV"))

stdout, stderr := testcli.RequireSuccessfulRun(t, "clusters", "list")
Expand All @@ -29,7 +29,7 @@ func TestAccClustersList(t *testing.T) {
assert.NotEmpty(t, clusterId)
}

func TestAccClustersGet(t *testing.T) {
func TestClustersGet(t *testing.T) {
t.Log(testutil.GetEnvOrSkipTest(t, "CLOUD_ENV"))

clusterId := findValidClusterID(t)
Expand Down
Loading
Loading