From b0964f0bb7370a3a9bf0563408d6957747343827 Mon Sep 17 00:00:00 2001 From: Martin Kaeser Date: Tue, 6 Jun 2023 09:20:05 +0200 Subject: [PATCH] feat(bridge): Add test config for BridgeClient and simple dummy IT --- .../catenax/bpdm/bridge/dummy/BridgeSyncIT.kt | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt b/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt index a75a39401..c3298f620 100644 --- a/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt +++ b/bpdm-bridge-dummy/src/test/kotlin/com/catenax/bpdm/bridge/dummy/BridgeSyncIT.kt @@ -20,6 +20,14 @@ package com.catenax.bpdm.bridge.dummy import com.catenax.bpdm.bridge.dummy.client.BridgeClient +import com.catenax.bpdm.bridge.dummy.util.BpdmGateContextInitializer +import com.catenax.bpdm.bridge.dummy.util.BpdmPoolContextInitializer +import com.catenax.bpdm.bridge.dummy.util.OpenSearchContextInitializer +import com.catenax.bpdm.bridge.dummy.util.PostgreSQLContextInitializer +import org.eclipse.tractusx.bpdm.common.dto.request.PaginationRequest +import org.eclipse.tractusx.bpdm.gate.api.client.GateClient +import org.eclipse.tractusx.bpdm.pool.api.client.PoolApiClient +import org.junit.jupiter.api.Test import com.catenax.bpdm.bridge.dummy.testdata.GateRequestValues import com.catenax.bpdm.bridge.dummy.util.* import org.assertj.core.api.Assertions.assertThat @@ -53,6 +61,18 @@ private val DEFAULT_PAGINATION_REQUEST = PaginationRequest(0, 100) class BridgeSyncIT @Autowired constructor( val bridgeClient: BridgeClient, val gateClient: GateClient, + val poolClient: PoolApiClient +) { + + @Test + fun `use API clients`() { + val gateChangelogs = gateClient.changelog().getChangelogEntriesLsaType( + paginationRequest = PaginationRequest(0, 10), fromTime = null, lsaType = null + ) + val poolChangelogs = poolClient.businessPartners().getChangelogEntries( + paginationRequest = PaginationRequest(0, 10), modifiedAfter = null, bpn = null + ) + bridgeClient.bridge().triggerSync() val poolClient: PoolApiClient, val testHelpers: TestHelpers ) {