Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jul 8, 2024
1 parent 4aed132 commit 4b1f1b2
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions edc-tests/edc-controlplane/catalog-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ dependencies {
testImplementation(libs.edc.junit)
testImplementation(libs.restAssured)
testImplementation(libs.awaitility)
testRuntimeOnly(libs.edc.transaction.local)

}

// do not publish
Expand Down
2 changes: 2 additions & 0 deletions edc-tests/edc-controlplane/edr-api-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ dependencies {
testImplementation(libs.edc.junit)
testImplementation(libs.restAssured)
testImplementation(libs.awaitility)
testRuntimeOnly(libs.edc.transaction.local)

}

// do not publish
Expand Down
2 changes: 2 additions & 0 deletions edc-tests/edc-controlplane/iatp-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ dependencies {
testImplementation(libs.edc.core.token)
testImplementation(libs.edc.identity.vc.ldp)
testImplementation(libs.edc.lib.jws2020)
testRuntimeOnly(libs.edc.transaction.local)

// 3rd party libs
testImplementation(libs.netty.mockserver)
testImplementation(libs.restAssured)
Expand Down
1 change: 1 addition & 0 deletions edc-tests/edc-controlplane/policy-tests/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ dependencies {
testImplementation(libs.edc.junit)
testImplementation(libs.restAssured)
testImplementation(libs.awaitility)
testRuntimeOnly(libs.edc.transaction.local)
}

// do not publish
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,6 @@ titaniumJsonLd = { module = "com.apicatalog:titanium-json-ld", version.ref = "ti
[bundles]
edc-connector = ["edc.boot", "edc.core-connector", "edc.core-controlplane", "edc.api-observability"]
edc-dpf = ["edc.dpf-transfer-signaling", "edc.dpf-selector-core", "edc.spi-dataplane-selector"]
edc-sqlstores = ["edc.sql-assetindex", "edc.sql-contract-definition", "edc.sql-contract-negotiation", "edc.sql-transferprocess", "edc.sql-policydef", "edc.sql-policy-monitor", "edc.sql-edrindex"]
edc-sqlstores = ["edc.sql-assetindex", "edc.sql-contract-definition", "edc.sql-contract-negotiation", "edc.sql-transferprocess", "edc.sql-policydef", "edc.sql-policy-monitor", "edc.sql-edrindex", "edc-transaction-local"]
edc-monitoring = ["edc.micrometer-core", "edc.micrometer-jersey", "edc.micrometer-jetty"]
edc-sts = ["edc-identity-trust-sts-core", "edc-identity-trust-sts-api", "edc-identity-trust-sts-client-configuration"]
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@
import org.mockito.ArgumentMatcher;

import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

class MultiTenantRuntimeTest {

Expand Down Expand Up @@ -60,7 +62,7 @@ void throwsExceptionIfTenantsFileDoesNotExist() {
@Test
void threadForEveryTenant() {
System.setProperty("edc.tenants.path", "./src/test/resources/tenants.properties");

when(monitor.withPrefix(anyString())).thenReturn(monitor);
runtime.boot(false);

verify(monitor, times(2)).info(argThat(connectorIsReady()));
Expand Down
5 changes: 4 additions & 1 deletion samples/multi-tenancy/src/test/resources/tenants.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#
# SPDX-License-Identifier: Apache-2.0
#################################################################################

edc.tenants.one.edc.any=any
edc.tenants.one.web.http.port=18181
edc.tenants.one.web.http.path=/api
Expand All @@ -26,6 +25,8 @@ edc.tenants.one.web.http.control.port=18283
edc.tenants.one.web.http.control.path=/control
edc.tenants.one.web.http.management.port=18284
edc.tenants.one.web.http.management.path=/management
edc.tenants.one.web.http.catalog.port=18285
edc.tenants.one.web.http.catalog.path=/catalog
edc.tenants.one.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com
edc.tenants.one.edc.iam.issuer.id=did:web:tenant1
edc.tenants.two.edc.any=any
Expand All @@ -37,5 +38,7 @@ edc.tenants.two.web.http.control.port=28283
edc.tenants.two.web.http.control.path=/control
edc.tenants.two.web.http.management.port=28284
edc.tenants.two.web.http.management.path=/management
edc.tenants.two.web.http.catalog.port=28285
edc.tenants.two.web.http.catalog.path=/catalog
edc.tenants.two.tx.edc.iam.iatp.bdrs.server.url=http://bdrs.test.com
edc.tenants.two.edc.iam.issuer.id=did:web:tenant2

0 comments on commit 4b1f1b2

Please sign in to comment.