Skip to content

Commit 404bdcb

Browse files
authored
Improved unit test for creating database (#1179)
## Changes Fix failing test caused by change in underlying implementation ### Linked issues Resolves #1174 ### Functionality - [ ] added relevant user documentation - [ ] added new CLI command - [ ] modified existing command: `databricks labs ucx ...` - [ ] added a new workflow - [ ] modified existing workflow: `...` - [ ] added a new table - [ ] modified existing table: `...` ### Tests - [ ] manually tested - [ ] added unit tests - [ ] added integration tests - [ ] verified on staging environment (screenshot attached) Fixed unit test
1 parent c019f81 commit 404bdcb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/unit/test_install.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,11 @@ def test_create_database(ws, caplog, mock_installation, any_prompt):
224224
)
225225

226226
with pytest.raises(BadRequest) as failure:
227-
workspace_installation.run()
227+
try:
228+
workspace_installation.run()
229+
except ManyError as e:
230+
assert len(e.errs) == 1
231+
raise e.errs[0]
228232

229233
assert "Kindly uninstall and reinstall UCX" in str(failure.value)
230234

0 commit comments

Comments
 (0)