You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by "mmodzelewski (via GitHub)" <gi...@apache.org> on 2025/11/25 09:01:51 UTC
[PR] feat(connectors): add wiremock stubs for the http config provider [iggy]
mmodzelewski opened a new pull request, #2409:
URL: https://github.com/apache/iggy/pull/2409
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(connectors): implement e2e tests for http config provider [iggy]
Posted by "piotr-laserdata (via GitHub)" <gi...@apache.org>.
piotr-laserdata commented on code in PR #2409:
URL: https://github.com/apache/iggy/pull/2409#discussion_r2571448125
##########
core/integration/tests/connectors/http_config_provider/direct_responses.rs:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use crate::connectors::http_config_provider::WireMockMode;
+use reqwest::StatusCode;
+
+#[tokio::test]
+async fn test_source_configs_list_returns_all_versions() {
+ let wiremock_runtime =
+ crate::connectors::http_config_provider::setup(WireMockMode::Direct).await;
+ let http_api_address = wiremock_runtime
+ .connectors_runtime
+ .connectors_api_address()
+ .expect("connector runtime should be available");
+ let client = reqwest::Client::new();
+
+ let response = client
+ .get(format!("{http_api_address}/sources/random/configs"))
+ .send()
+ .await
+ .expect("GET /sources/random/configs request should succeed");
+
+ assert_eq!(response.status(), StatusCode::OK);
+
+ let body: serde_json::Value = response.json().await.unwrap();
Review Comment:
Should we use raw JSON value, or deserialize already to the existing response models?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(connectors): implement e2e tests for http config provider [iggy]
Posted by "spetz (via GitHub)" <gi...@apache.org>.
spetz commented on code in PR #2409:
URL: https://github.com/apache/iggy/pull/2409#discussion_r2571450441
##########
core/integration/tests/connectors/http_config_provider/direct_responses.rs:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use crate::connectors::http_config_provider::WireMockMode;
+use reqwest::StatusCode;
+
+#[tokio::test]
+async fn test_source_configs_list_returns_all_versions() {
+ let wiremock_runtime =
+ crate::connectors::http_config_provider::setup(WireMockMode::Direct).await;
+ let http_api_address = wiremock_runtime
+ .connectors_runtime
+ .connectors_api_address()
+ .expect("connector runtime should be available");
+ let client = reqwest::Client::new();
+
+ let response = client
+ .get(format!("{http_api_address}/sources/random/configs"))
+ .send()
+ .await
+ .expect("GET /sources/random/configs request should succeed");
+
+ assert_eq!(response.status(), StatusCode::OK);
+
+ let body: serde_json::Value = response.json().await.unwrap();
Review Comment:
Should we use raw JSON value, or deserialize already to the existing response models?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(connectors): implement e2e tests for http config provider [iggy]
Posted by "piotr-laserdata (via GitHub)" <gi...@apache.org>.
piotr-laserdata commented on code in PR #2409:
URL: https://github.com/apache/iggy/pull/2409#discussion_r2571448125
##########
core/integration/tests/connectors/http_config_provider/direct_responses.rs:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use crate::connectors::http_config_provider::WireMockMode;
+use reqwest::StatusCode;
+
+#[tokio::test]
+async fn test_source_configs_list_returns_all_versions() {
+ let wiremock_runtime =
+ crate::connectors::http_config_provider::setup(WireMockMode::Direct).await;
+ let http_api_address = wiremock_runtime
+ .connectors_runtime
+ .connectors_api_address()
+ .expect("connector runtime should be available");
+ let client = reqwest::Client::new();
+
+ let response = client
+ .get(format!("{http_api_address}/sources/random/configs"))
+ .send()
+ .await
+ .expect("GET /sources/random/configs request should succeed");
+
+ assert_eq!(response.status(), StatusCode::OK);
+
+ let body: serde_json::Value = response.json().await.unwrap();
Review Comment:
Should we use raw JSON value, or deserialize already to the existing response models?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(connectors): implement e2e tests for http config provider [iggy]
Posted by "mmodzelewski (via GitHub)" <gi...@apache.org>.
mmodzelewski commented on code in PR #2409:
URL: https://github.com/apache/iggy/pull/2409#discussion_r2571462977
##########
core/integration/tests/connectors/http_config_provider/direct_responses.rs:
##########
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+use crate::connectors::http_config_provider::WireMockMode;
+use reqwest::StatusCode;
+
+#[tokio::test]
+async fn test_source_configs_list_returns_all_versions() {
+ let wiremock_runtime =
+ crate::connectors::http_config_provider::setup(WireMockMode::Direct).await;
+ let http_api_address = wiremock_runtime
+ .connectors_runtime
+ .connectors_api_address()
+ .expect("connector runtime should be available");
+ let client = reqwest::Client::new();
+
+ let response = client
+ .get(format!("{http_api_address}/sources/random/configs"))
+ .send()
+ .await
+ .expect("GET /sources/random/configs request should succeed");
+
+ assert_eq!(response.status(), StatusCode::OK);
+
+ let body: serde_json::Value = response.json().await.unwrap();
Review Comment:
I would prefer to keep these separate from the existing structs, so the test would fail if someone makes an unintentional change to the contract. I could copy the response structs though and map to these instead of the raw JSON.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(connectors): implement e2e tests for http config provider [iggy]
Posted by "mmodzelewski (via GitHub)" <gi...@apache.org>.
mmodzelewski merged PR #2409:
URL: https://github.com/apache/iggy/pull/2409
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@iggy.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org