Skip to content

Commit cd48921

Browse files
denikIsaac
andcommitted
testserver: report a missing UC secret with UC's message
Co-authored-by: Isaac <no-reply@databricks.com>
1 parent cda5631 commit cd48921

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎acceptance/bundle/resources/secrets/recreate_in_renamed_schema/output.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ Resources: 1 created, 1 changed, 1 deleted, 1 unchanged
199199

200200
=== The old secret, moved with the renamed schema, was deleted there
201201
>>> musterr [CLI] secrets-uc get-secret test_catalog_[UNIQUE_NAME].myschema2.mysecret
202-
Error: Secret test_catalog_[UNIQUE_NAME].myschema2.mysecret not found
202+
Error: Secret 'test_catalog_[UNIQUE_NAME].myschema2.mysecret' does not exist.
203203

204204
=== Redeploy is a no-op
205205
>>> [CLI] bundle plan

‎libs/testserver/uc_secrets.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func (s *FakeWorkspace) SecretsUcGetSecret(req Request) Response {
9494
StatusCode: 404,
9595
Body: map[string]any{
9696
"error_code": "RESOURCE_DOES_NOT_EXIST",
97-
"message": fmt.Sprintf("Secret %s not found", fullName),
97+
"message": fmt.Sprintf("Secret '%s' does not exist.", fullName),
9898
},
9999
}
100100
}
@@ -143,7 +143,7 @@ func (s *FakeWorkspace) SecretsUcUpdateSecret(req Request) Response {
143143
StatusCode: 404,
144144
Body: map[string]any{
145145
"error_code": "RESOURCE_DOES_NOT_EXIST",
146-
"message": fmt.Sprintf("Secret %s not found", fullName),
146+
"message": fmt.Sprintf("Secret '%s' does not exist.", fullName),
147147
},
148148
}
149149
}
@@ -195,7 +195,7 @@ func (s *FakeWorkspace) SecretsUcDeleteSecret(req Request) Response {
195195
StatusCode: 404,
196196
Body: map[string]any{
197197
"error_code": "RESOURCE_DOES_NOT_EXIST",
198-
"message": fmt.Sprintf("Secret %s not found", fullName),
198+
"message": fmt.Sprintf("Secret '%s' does not exist.", fullName),
199199
},
200200
}
201201
}

0 commit comments

Comments
 (0)