Skip to content

Commit

Permalink
Test invalid migration progress prerequisites due to not run assessme…
Browse files Browse the repository at this point in the history
…nt workflow
  • Loading branch information
JCZuurmond committed Oct 8, 2024
1 parent f0eac5c commit f1ddb60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def mock_installation() -> MockInstallation:
'workspace_name': 'workspace',
},
],
'state.json': {'resources': {'jobs': {'test': '123'}}},
'state.json': {'resources': {'jobs': {'test': '123', 'assessment': '456'}}},
}
)

Expand Down
6 changes: 6 additions & 0 deletions tests/unit/progress/test_workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,9 @@ def test_migration_progress_raises_runtime_error_if_missing_permissions_to_acces
task = MigrationProgress.verify_prerequisites
with pytest.raises(RuntimeWarning, match="UCX catalog not configured. .*"):
run_workflow(task, workspace_client=ws)


def test_migration_progress_raises_runtime_error_if_assessment_workflow_did_not_run(run_workflow) -> None:
task = MigrationProgress.verify_prerequisites
with pytest.raises(RuntimeWarning, match="Assessment workflow not completed successfully"):
run_workflow(task)

0 comments on commit f1ddb60

Please sign in to comment.