def METHOD_NAME(context, mocker, set_required_env_vars):
    ds_type = "sql"
    datasource_config = {"type": ds_type, "name": "test-1-2-3"}
    config_id = UUID("df02b47c-e1b8-48a8-9aaa-b6ed9c49ffa5")
    create_session = mocker.patch(
        "great_expectations.agent.actions.draft_datasource_config_action.create_session"
    )
    session = create_session.return_value
    response = session.get.return_value
    response.ok = True
    response.json.return_value = build_payload(config=datasource_config, id=config_id)
    env_vars = GxAgentEnvVars()
    action = DraftDatasourceConfigAction(context=context)
    job_id = UUID("87657a8e-f65e-4e64-b21f-e83a54738b75")
    event = DraftDatasourceConfigEvent(config_id=config_id)
    expected_url = f"{env_vars.gx_cloud_base_url}/organizations/{env_vars.gx_cloud_organization_id}/datasources/drafts/{config_id}"
    datasource_cls = MagicMock(autospec=SQLDatasource)
    context.sources.type_lookup = {ds_type: datasource_cls}
    datasource_cls.return_value.test_connection.side_effect = TestConnectionError
    with pytest.raises(TestConnectionError):
        action.run(event=event, id=str(job_id))
    session.get.assert_called_with(expected_url)