File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
- def test_progress_tracking_installer_creates_workflow_runs_table (az_cli_ctx ) -> None :
1
+ import pytest
2
+
3
+
4
+ @pytest .mark .parametrize ("table_name" , ["workflow_runs" , "historical_records" ])
5
+ def test_progress_tracking_installer_creates_table (az_cli_ctx , table_name ) -> None :
2
6
az_cli_ctx .progress_tracking_installation .run ()
3
7
query = (
4
8
f"SELECT 1 FROM tables WHERE table_catalog = '{ az_cli_ctx .config .ucx_catalog } ' "
5
- "AND table_schema = 'multiworkspace' AND table_name = 'workflow_runs '"
9
+ f "AND table_schema = 'multiworkspace' AND table_name = '{ table_name } '"
6
10
)
7
11
assert any (az_cli_ctx .sql_backend .fetch (query , catalog = "system" , schema = "information_schema" ))
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ def test_progress_tracking_installation_run_creates_progress_tracking_schema(moc
7
7
assert "CREATE SCHEMA IF NOT EXISTS ucx.multiworkspace" in mock_backend .queries [0 ]
8
8
9
9
10
- def test_progress_tracking_installation_run_creates_workflow_runs_table (mock_backend ) -> None :
10
+ def test_progress_tracking_installation_run_creates_tables (mock_backend ) -> None :
11
11
installation = ProgressTrackingInstallation (mock_backend , "ucx" )
12
12
installation .run ()
13
13
# Dataclass to schema conversion is tested within the lsql package
14
- assert any ("CREATE TABLE IF NOT EXISTS" in query for query in mock_backend .queries )
14
+ assert sum ("CREATE TABLE IF NOT EXISTS" in query for query in mock_backend .queries ) == 2
You can’t perform that action at this time.
0 commit comments