Skip to content

Commit 7b8dd11

Browse files
committed
Based on the changes, here's a concise commit message:
refactor: Update destroyBundle to not return error in bundle tests
1 parent d8bf995 commit 7b8dd11

18 files changed

+20
-36
lines changed

integration/bundle/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func TestBasicBundleDeployWithFailOnActiveRuns(t *testing.T) {
2323
})
2424

2525
t.Cleanup(func() {
26-
require.NoError(t, destroyBundle(t, ctx, root))
26+
destroyBundle(t, ctx, root)
2727
})
2828

2929
// deploy empty bundle

integration/bundle/bind_resource_test.go

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,7 @@ func TestBindJobToExistingJob(t *testing.T) {
6464
err = os.RemoveAll(filepath.Join(bundleRoot, ".databricks"))
6565
require.NoError(t, err)
6666

67-
err = destroyBundle(t, ctx, bundleRoot)
68-
require.NoError(t, err)
67+
destroyBundle(t, ctx, bundleRoot)
6968

7069
// Check that job is unbound and exists after bundle is destroyed
7170
job, err = w.Jobs.Get(ctx, jobs.GetJobRequest{
@@ -91,9 +90,7 @@ func TestAbortBind(t *testing.T) {
9190
jobId := gt.createTestJob(ctx)
9291
t.Cleanup(func() {
9392
gt.destroyJob(ctx, jobId)
94-
if err := destroyBundle(t, ctx, bundleRoot); err != nil {
95-
t.Error(err)
96-
}
93+
destroyBundle(t, ctx, bundleRoot)
9794
})
9895

9996
// Bind should fail because prompting is not possible.

integration/bundle/clusters_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ func TestDeployBundleWithCluster(t *testing.T) {
2727
})
2828

2929
t.Cleanup(func() {
30-
err := destroyBundle(t, ctx, root)
31-
require.NoError(t, err)
30+
destroyBundle(t, ctx, root)
3231

3332
cluster, err := wt.W.Clusters.GetByClusterName(ctx, fmt.Sprintf("test-cluster-%s", uniqueId))
3433
if err != nil {

integration/bundle/dashboards_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ func TestDashboards(t *testing.T) {
2424
})
2525

2626
t.Cleanup(func() {
27-
err := destroyBundle(t, ctx, root)
28-
require.NoError(t, err)
27+
destroyBundle(t, ctx, root)
2928
})
3029

3130
deployBundle(t, ctx, root)

integration/bundle/deploy_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ func setupUcSchemaBundle(t *testing.T, ctx context.Context, w *databricks.Worksp
3232
deployBundle(t, ctx, bundleRoot)
3333

3434
t.Cleanup(func() {
35-
err := destroyBundle(t, ctx, bundleRoot)
36-
require.NoError(t, err)
35+
destroyBundle(t, ctx, bundleRoot)
3736
})
3837

3938
// Assert the schema is created

integration/bundle/deploy_then_remove_resources_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ func TestBundleDeployThenRemoveResources(t *testing.T) {
5555
assert.ErrorContains(t, err, "does not exist")
5656

5757
t.Cleanup(func() {
58-
err = destroyBundle(t, ctx, bundleRoot)
59-
require.NoError(t, err)
58+
destroyBundle(t, ctx, bundleRoot)
6059
})
6160
}

integration/bundle/deploy_to_shared_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ func TestDeployBasicToSharedWorkspacePath(t *testing.T) {
2828
require.NoError(t, err)
2929

3030
t.Cleanup(func() {
31-
err = destroyBundle(wt, ctx, bundleRoot)
32-
require.NoError(wt, err)
31+
destroyBundle(wt, ctx, bundleRoot)
3332
})
3433

3534
deployBundle(wt, ctx, bundleRoot)

integration/bundle/deployment_state_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestFilesAreSyncedCorrectlyWhenNoSnapshot(t *testing.T) {
4242
deployBundle(t, ctx, bundleRoot)
4343

4444
t.Cleanup(func() {
45-
require.NoError(t, destroyBundle(t, ctx, bundleRoot))
45+
destroyBundle(t, ctx, bundleRoot)
4646
})
4747

4848
remoteRoot := getBundleRemoteRootPath(w, t, uniqueId)

integration/bundle/destroy_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ func TestBundleDestroy(t *testing.T) {
5858
assert.Equal(t, job.Settings.Name, jobName)
5959

6060
// destroy bundle
61-
err = destroyBundle(t, ctx, bundleRoot)
62-
require.NoError(t, err)
61+
destroyBundle(t, ctx, bundleRoot)
6362

6463
// assert pipeline is deleted
6564
_, err = w.Pipelines.GetByName(ctx, pipelineName)

integration/bundle/empty_bundle_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func TestEmptyBundleDeploy(t *testing.T) {
2929
deployBundle(t, ctx, tmpDir)
3030

3131
t.Cleanup(func() {
32-
err = destroyBundle(t, ctx, tmpDir)
33-
require.NoError(t, err)
32+
destroyBundle(t, ctx, tmpDir)
3433
})
3534
}

0 commit comments

Comments
 (0)