From aa0b6080a49de8f64e8f12a8b526442745e97ef0 Mon Sep 17 00:00:00 2001
From: Andrew Nester <andrew.nester@databricks.com>
Date: Wed, 11 Dec 2024 15:00:43 +0100
Subject: [PATCH] Fixed TestAccBundleDeployUcSchema test (#1997)

## Changes
It was failing because when schema.yml was removed, `catalog: main`
option left set in the base pipeline definition in databricks.yml which
lead to incorrect config (empty target schema)
https://github.com/databricks/cli/pull/1413

Backend behaviour changed and DLT pipelines stopped to accept empty
targets leading to the error which was ignored before.

## Tests
```
--- PASS: TestAccBundleDeployUcSchema (41.75s)
PASS
coverage: 33.3% of statements in ./...
ok      github.com/databricks/cli/internal/bundle       42.210s coverage: 33.3% of statements in ./...
```
---
 internal/bundle/bundles/uc_schema/template/databricks.yml.tmpl | 1 -
 internal/bundle/bundles/uc_schema/template/schema.yml.tmpl     | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/internal/bundle/bundles/uc_schema/template/databricks.yml.tmpl b/internal/bundle/bundles/uc_schema/template/databricks.yml.tmpl
index 15076ac85..0cb8d4f61 100644
--- a/internal/bundle/bundles/uc_schema/template/databricks.yml.tmpl
+++ b/internal/bundle/bundles/uc_schema/template/databricks.yml.tmpl
@@ -12,7 +12,6 @@ resources:
         - notebook:
             path: ./nb.sql
       development: true
-      catalog: main
 
 include:
   - "*.yml"
diff --git a/internal/bundle/bundles/uc_schema/template/schema.yml.tmpl b/internal/bundle/bundles/uc_schema/template/schema.yml.tmpl
index 50067036e..0fcf10453 100644
--- a/internal/bundle/bundles/uc_schema/template/schema.yml.tmpl
+++ b/internal/bundle/bundles/uc_schema/template/schema.yml.tmpl
@@ -11,3 +11,4 @@ targets:
       pipelines:
         foo:
           target: ${resources.schemas.bar.id}
+          catalog: main