Skip to content

Commit 5b12bdd

Browse files
Fixed databricks_metastore_assignment resource (#1900)
* fix metastore assignment * Update metastore assignment test
1 parent 5254936 commit 5b12bdd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

catalog/resource_metastore_assignment.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ func (a MetastoreAssignmentAPI) updateMetastoreAssignment(ma MetastoreAssignment
3434
}
3535

3636
func (a MetastoreAssignmentAPI) getAssignedMetastoreID() (string, error) {
37-
var ma MetastoreAssignment
38-
err := a.client.Get(a.context, "/unity-catalog/metastore_summary", nil, &ma)
39-
return ma.MetastoreID, err
37+
var mi MetastoreInfo
38+
err := a.client.Get(a.context, "/unity-catalog/metastore_summary", nil, &mi)
39+
return mi.MetastoreID, err
4040
}
4141

4242
func (a MetastoreAssignmentAPI) deleteMetastoreAssignment(workspaceID, metastoreID string) error {

catalog/resource_metastore_assignment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestMetastoreAssignment_Create(t *testing.T) {
2727
{
2828
Method: "GET",
2929
Resource: "/api/2.1/unity-catalog/metastore_summary",
30-
Response: MetastoreAssignment{
30+
Response: MetastoreInfo{
3131
MetastoreID: "a",
3232
},
3333
},

0 commit comments

Comments
 (0)