getWorkFlowSeparateCPandDP(Customer customerDetails,
inputConfiguration.putAll(
connectorRegistrationManager.registerConnector(customerDetails, tool, inputConfiguration, triger));
+ try {
+ inputConfiguration.putAll(testConnectorServiceManager
+ .verifyConnectorTestingThroughTestService(customerDetails, inputConfiguration, triger));
+ } catch (ServiceException ex) {
+ log.warn(ex.getMessage());
+ }
+
return inputConfiguration;
}
diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java
new file mode 100644
index 00000000..a8b18727
--- /dev/null
+++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestRequest.java
@@ -0,0 +1,36 @@
+/********************************************************************************
+ * Copyright (c) 2022, 2023 T-Systems International GmbH
+ * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Apache License, Version 2.0 which is available at
+ * https://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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ ********************************************************************************/
+
+package org.eclipse.tractusx.autosetup.testservice.proxy;
+
+import lombok.Builder;
+import lombok.Data;
+
+@Data
+@Builder
+public class ConnectorTestRequest {
+
+ private String connectorHost;
+
+ private String apiKeyHeader;
+
+ private String apiKeyValue;
+
+}
diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java
new file mode 100644
index 00000000..62fc44ea
--- /dev/null
+++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceProxy.java
@@ -0,0 +1,33 @@
+/********************************************************************************
+ * Copyright (c) 2022, 2023 T-Systems International GmbH
+ * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Apache License, Version 2.0 which is available at
+ * https://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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ ********************************************************************************/
+
+package org.eclipse.tractusx.autosetup.testservice.proxy;
+
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+@FeignClient(name = "ConnectorTestServiceProxy", url = "${connector.test.service.url}")
+public interface ConnectorTestServiceProxy {
+
+ @PostMapping("/connector-test")
+ public ConnectorTestServiceResponse verifyConnectorTestingThroughTestService(@RequestBody ConnectorTestRequest connectorTestRequest);
+
+}
diff --git a/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java
new file mode 100644
index 00000000..fc6497e9
--- /dev/null
+++ b/src/main/java/org/eclipse/tractusx/autosetup/testservice/proxy/ConnectorTestServiceResponse.java
@@ -0,0 +1,30 @@
+/********************************************************************************
+ * Copyright (c) 2022, 2023 T-Systems International GmbH
+ * Copyright (c) 2022, 2023 Contributors to the Eclipse Foundation
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Apache License, Version 2.0 which is available at
+ * https://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.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ ********************************************************************************/
+
+package org.eclipse.tractusx.autosetup.testservice.proxy;
+
+import lombok.Data;
+
+@Data
+public class ConnectorTestServiceResponse {
+
+ private String message;
+
+}
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 997ce591..8b318b80 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -64,6 +64,8 @@ vault.url=${vaultUrl}
vault.token=${vaultToken}
vault.timeout=30
+#Connector Test service details
+connector.test.service.url=${connectorTestServiceUrl}
#Portal interface info
portal.url=${portalurl}
diff --git a/src/main/resources/flyway/V1__auto-setup-table.sql b/src/main/resources/flyway/V1__auto-setup-table.sql
index 2c26c246..73490e53 100644
--- a/src/main/resources/flyway/V1__auto-setup-table.sql
+++ b/src/main/resources/flyway/V1__auto-setup-table.sql
@@ -112,7 +112,7 @@ connector.discovery.token-url=$\{sde.connector.discovery.token-url\}
connector.discovery.clientId=$\{sde.connector.discovery.clientId\}
-connector.discovery.clientSecret=$\{sde.connector.discovery.clientSecret\}', NULL, 'sde-backend/dftbackend', '1.9.0', 'helm.packages', 'v1alpha1', '{"dftpostgresql": {"enabled": true, "auth" : {"secretKeys":{"password":"$\{postgresPassword}"\},"username":"$\{username\}","database":"$\{database\}"}},"ingresses":[{"enabled": true, "hostname":"$\{dnsName\}", "annotations": {}, "className": "nginx", "endpoints":["default"], "tls":{"enabled":true, "secretName":"dftbackend"}, "certManager":{"clusterIssuer":"letsencrypt-prod"}}], "configuration": {"properties": "$\{yamlValues\}"}}', 'PROPERTY');
+connector.discovery.clientSecret=$\{sde.connector.discovery.clientSecret\}', NULL, 'sde-backend/dftbackend', '2.0.0', 'helm.packages', 'v1alpha1', '{"dftpostgresql": {"enabled": true, "primary":{"persistence":{"size" :"1Gi"}},"persistence":{"size" :"1Gi"}, "auth" : {"secretKeys":{"password":"$\{postgresPassword}"\},"username":"$\{username\}","database":"$\{database\}"}},"ingresses":[{"enabled": true, "hostname":"$\{dnsName\}", "annotations": {}, "className": "nginx", "endpoints":["default"], "tls":{"enabled":true, "secretName":"dftbackend"}, "certManager":{"clusterIssuer":"letsencrypt-prod"}}], "configuration": {"properties": "$\{yamlValues\}"}}', 'PROPERTY');
INSERT INTO app_tbl
(app_name, context_cluster, context_namespace, expected_input_data, output_data, package_identifier, package_version, plugin_name, plugin_version, required_yaml_configuration, yaml_value_field_type)
VALUES('DFT_FRONTEND', 'default', 'kubeapps', 'REACT_APP_API_URL=$\{dftBackEndUrl\}
@@ -125,7 +125,7 @@ REACT_APP_CLIENT_ID=$\{dftfrontendkeycloakclientid\}
REACT_APP_DEFAULT_COMPANY_BPN=$\{bpnNumber\}
-REACT_APP_FILESIZE=268435456', NULL, 'sde-frontend/dftfrontend', '1.9.0', 'helm.packages', 'v1alpha1', '{"ingresses":[{"enabled": true, "hostname":"$\{dnsName\}", "annotations": {}, "className": "nginx", "endpoints":["default"], "tls":{"enabled":true, "secretName":"dftfrontend"}, "certManager":{"clusterIssuer":"letsencrypt-prod"}}], "configuration": {"properties": "$\{yamlValues\}"}}', 'PROPERTY');
+REACT_APP_FILESIZE=268435456', NULL, 'sde-frontend/dftfrontend', '2.0.0', 'helm.packages', 'v1alpha1', '{"ingresses":[{"enabled": true, "hostname":"$\{dnsName\}", "annotations": {}, "className": "nginx", "endpoints":["default"], "tls":{"enabled":true, "secretName":"dftfrontend"}, "certManager":{"clusterIssuer":"letsencrypt-prod"}}], "configuration": {"properties": "$\{yamlValues\}"}}', 'PROPERTY');
INSERT INTO app_tbl
(app_name, context_cluster, context_namespace, expected_input_data, output_data, package_identifier, package_version, plugin_name, plugin_version, required_yaml_configuration, yaml_value_field_type)
VALUES('EDC_CONTROLPLANE', 'default', 'kubeapps', 'edc.receiver.http.endpoint=$\{dftAddress\}
diff --git a/src/main/resources/templates/edc_success_activate.html b/src/main/resources/templates/edc_success_activate.html
index cdc116ca..2e8d5fbe 100644
--- a/src/main/resources/templates/edc_success_activate.html
+++ b/src/main/resources/templates/edc_success_activate.html
@@ -41,7 +41,8 @@
EDC ApiKey : ${edcApiKey}
EDC ApiKeyValue : ${edcApiKeyValue}
Data Plane URL : ${dataPlanePublicEndpoint}
-
+
Your connector status through connector test service: ${connectorTestResult}, check status again here
+
Kind Regards
Catina-X
diff --git a/src/main/resources/templates/success_activate.html b/src/main/resources/templates/success_activate.html
index 1cc49b9b..6333062f 100644
--- a/src/main/resources/templates/success_activate.html
+++ b/src/main/resources/templates/success_activate.html
@@ -33,6 +33,7 @@
Hello ${orgname},
The SDE/DFT tool successfully activated for your use.
Please click here to start using it.
+ Your connector status through connector test service: ${connectorTestResult}, check status again here
Note: You need to use your own organization login credential to login SDE/DFT tool.
Kind Regards
Catina-X
diff --git a/src/test/java/org/eclipse/tractusx/autosetup/manager/DFTBackendManagerTest.java b/src/test/java/org/eclipse/tractusx/autosetup/manager/DFTBackendManagerTest.java
index c901d277..272bea8f 100644
--- a/src/test/java/org/eclipse/tractusx/autosetup/manager/DFTBackendManagerTest.java
+++ b/src/test/java/org/eclipse/tractusx/autosetup/manager/DFTBackendManagerTest.java
@@ -63,7 +63,7 @@ void managePackage() {
mockInputMap.put("dnsNameURLProtocol", "https");
Map resultMap = dftBackendManager.managePackage(null, AppActions.CREATE, selectedTools,
mockInputMap, null);
- assertEquals(18, resultMap.size());
+ assertEquals(17, resultMap.size());
assertEquals("test", mockInputMap.get("dnsName"));
}
}
\ No newline at end of file
diff --git a/src/test/resources/application-test.properties b/src/test/resources/application-test.properties
index 224024dc..57d6dc56 100644
--- a/src/test/resources/application-test.properties
+++ b/src/test/resources/application-test.properties
@@ -36,6 +36,8 @@ vault.url=test
vault.token=test
vault.timeout=30
+#Connector Test service details
+connector.test.service.url=test
#Portal interface info
portal.url=test