Skip to content

Commit 48e5225

Browse files
committed
fix(ingestion): fix ES SSL context and SAS client test assertions
1 parent 02a3840 commit 48e5225

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

ingestion/src/metadata/ingestion/source/search/elasticsearch/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def get_ssl_context(
140140
)
141141
return ssl_context # noqa: RET504
142142

143-
return ssl.create_default_context()
143+
return None
144144

145145

146146
def get_connection(connection: ElasticsearchConnection) -> Elasticsearch:

ingestion/tests/unit/topology/database/test_sas_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_api_error_wrapping(self, mock_rest, mock_request):
104104

105105
with pytest.raises(APIError) as exc:
106106
client.get_instance("123")
107-
assert exc.value.args[0] == "Unauthorized access"
107+
assert "Unauthorized access" in str(exc.value)
108108

109109
@patch("metadata.ingestion.source.database.sas.client.requests.request")
110110
@patch("metadata.ingestion.source.database.sas.client.TrackedREST")
@@ -122,4 +122,4 @@ def test_get_views_error_sanitization(self, mock_rest, mock_request):
122122
with pytest.raises(APIError) as exc:
123123
client.get_views("query")
124124
# Should show the sanitized message instead of the raw error
125-
assert exc.value.args[0] == "Error fetching views from SAS"
125+
assert "Error fetching views from SAS" in str(exc.value)

openmetadata-spec/src/main/resources/json/schema/entity/services/connections/database/sasConnection.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,18 @@
2020
"default": "SAS"
2121
},
2222
"username": {
23+
"title": "Username",
2324
"description": "Username to connect to SAS Viya.",
2425
"type": "string"
2526
},
2627
"password": {
28+
"title": "Password",
2729
"description": "Password to connect to SAS Viya",
2830
"type": "string",
2931
"format": "password"
3032
},
3133
"serverHost": {
34+
"title": "Server Host",
3235
"description": "Hostname of SAS Viya deployment.",
3336
"type": "string",
3437
"format": "uri"

0 commit comments

Comments
 (0)