Skip to content

Commit

Permalink
A1SDS-2516:Replacing the new Connector registration service in Autosetup
Browse files Browse the repository at this point in the history
  • Loading branch information
ChetanT-System committed Jul 17, 2023
1 parent 4a2313e commit 7950d19
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.eclipse.tractusx.autosetup.portal.proxy.PortalIntegrationProxy;
import org.eclipse.tractusx.autosetup.utility.LogUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.FileSystemResource;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.retry.support.RetrySynchronizationManager;
Expand Down Expand Up @@ -90,13 +89,10 @@ public Map<String, String> registerConnector(Customer customerDetails, SelectedT
file = getTestFile(inputData.get("selfsigncertificate"));

MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();

body.add("name", customerDetails.getOrganizationName());
body.add("connectorUrl", inputData.get("controlPlaneEndpoint"));
body.add("status", ACTIVE);
body.add("location", customerDetails.getCountry());
body.add("providerBpn", inputData.get("bpnNumber"));
body.add("certificate", new FileSystemResource(file.toFile()));
body.add("subscriptionId", inputData.get("subscriptionId"));
Map<String, String> header = new HashMap<>();
header.put("Authorization", "Bearer " + getKeycloakToken());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public ServiceInstanceResultResponse postServiceInstanceResultAndGetTenantSpecs(
@RequestBody ServiceInstanceResultRequest serviceInstanceResultRequest);


@PostMapping("/api/administration/connectors/managed-daps")
@PostMapping("/api/administration/connectors/managed")
public String manageConnector(URI url, @RequestHeader Map<String, String> header,
@RequestBody MultiValueMap<String, Object> body);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void managePackage() {
mockInputMap.put("dnsNameURLProtocol", "https");
Map<String, String> resultMap = sdeManager.managePackage(null, AppActions.CREATE, selectedTools,
mockInputMap, null);
assertEquals(22, resultMap.size());
assertEquals(26, resultMap.size());
assertEquals("test", mockInputMap.get("dnsName"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ void uploadKeyandValues() {
.build();

mockInputMap = vaultManager.uploadKeyandValues(customer, selectedTools,mockInputMap, autoSetupTriggerEntry);
assertEquals(14, mockInputMap.size());
assertEquals(15, mockInputMap.size());
assertEquals("test", mockInputMap.get("targetCluster"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.tractusx.autosetup.kubeapps.proxy.KubeAppManageProxy;
import org.eclipse.tractusx.autosetup.mapper.AutoSetupRequestMapper;
import org.eclipse.tractusx.autosetup.model.AutoSetupRequest;
import org.eclipse.tractusx.autosetup.portal.proxy.PortalIntegrationProxy;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestInstance;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -44,6 +45,9 @@ class AutoSetupOrchitestratorServiceTest {
//@Spy
@Autowired
private AutoSetupOrchitestratorService autoSetupOrchitestratorService;

@MockBean
private PortalIntegrationProxy portalIntegrationProxy;


@MockBean
Expand Down

0 comments on commit 7950d19

Please sign in to comment.