Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
ununhexium committed Oct 25, 2024
1 parent cbb0101 commit ff7da0b
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package de.sovity.edc.extension.contacttermination;

import de.sovity.edc.ext.db.jooq.Tables;
import de.sovity.edc.extension.contacttermination.query.ContractAgreementIsTerminatedQuery;
import de.sovity.edc.extension.contacttermination.query.ContractAgreementTerminationDetailsQuery;
import de.sovity.edc.extension.contacttermination.query.TerminateContractQuery;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package de.sovity.edc.extension.vaultinit;

import org.eclipse.edc.runtime.metamodel.annotation.Inject;
import org.eclipse.edc.spi.monitor.Monitor;
import org.eclipse.edc.spi.security.Vault;
import org.eclipse.edc.spi.system.ServiceExtension;
import org.eclipse.edc.spi.system.ServiceExtensionContext;
Expand Down
3 changes: 3 additions & 0 deletions migration_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,7 @@ Play whack-a-mole between the new EDC usage of distribution, the `Media Type` as

The attribute https://w3id.org/edc/v0.0.1/ns/providerId has been deprecated in type https://w3id.org/edc/v0.0.1/ns/ContractRequest, please use http://www.w3.org/ns/odrl/2/assigner

###

Release as 0.0.1-20241025-2408-alpha1

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023 sovity GmbH
* Copyright (c) 2023 sovity GmbH
*
* This program and the accompanying materials are made available under the
* terms of the Apache License, Version 2.0 which is available at
Expand All @@ -11,8 +11,8 @@
* sovity GmbH - initial API and implementation
*
*/
package de.sovity.edc.e2e;

package de.sovity.edc.e2e;

import de.sovity.edc.client.EdcClient;
import de.sovity.edc.client.gen.model.DataSourceType;
Expand Down Expand Up @@ -97,7 +97,7 @@ void assetPageSorting(EdcClient client, AssetService assetService) {
.extracting(UiAsset::getAssetId)
.containsExactly("asset-23", "asset-22", "asset-21");

List.of("asset-21","asset-22","asset-23").forEach(id -> client.uiApi().deleteAsset(id));
List.of("asset-21", "asset-22", "asset-23").forEach(id -> client.uiApi().deleteAsset(id));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import de.sovity.edc.extension.e2e.junit.CeIntegrationTestExtension;
import lombok.SneakyThrows;
import lombok.val;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -27,14 +26,14 @@
public class Edc07MigrationBaselineTest {

@RegisterExtension
private static CeIntegrationTestExtension e2eTestExtension = CeIntegrationTestExtension.builder()
private static final CeIntegrationTestExtension INTEGRATION_TEST_EXTENSION = CeIntegrationTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.skipDb(false)
.build();

@SneakyThrows
@Test
void worked(Connection cnx) {
void smokeTest(Connection cnx) {
// arrange

// act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
class ManagementApiTransferTest {

@RegisterExtension
private static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand All @@ -44,15 +44,6 @@ void testDataTransfer(
// arrange
var assetId = UUID.randomUUID().toString();

/**
* TODO
*
* to find what a policy looks like:
*
* build it from the UiPolicy
* transform via PolicyMapper to JsonLd
*
*/
providerConnector.createDataOffer(assetId, testBackend.getDataSourceUrl(TEST_BACKEND_TEST_DATA));

// act
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.mockserver.model.HttpResponse;
import org.mockserver.model.HttpStatusCode;

import java.util.Base64;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;

Expand All @@ -42,7 +41,7 @@

class PlaceholderDataSourceExtensionTest {
@RegisterExtension
private static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/

// TODO package de.sovity.edc.ext.wrapper.api.ui.pages.policy;
package de.sovity.edc.e2e;

package de.sovity.edc.e2e;

import de.sovity.edc.client.EdcClient;
import de.sovity.edc.client.gen.model.OperatorDto;
Expand Down Expand Up @@ -44,7 +44,7 @@
class PolicyDefinitionApiServiceTest {

@RegisterExtension
static CeIntegrationTestExtension providerExtension = CeIntegrationTestExtension.builder()
private static final CeIntegrationTestExtension INTEGRATION_TEST_EXTENSION = CeIntegrationTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
14 changes: 7 additions & 7 deletions tests/src/test/java/de/sovity/edc/e2e/UiApiWrapperTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,10 @@ class UiApiWrapperTest {

private static final String PROVIDER_PARTICIPANT_ID = CeE2eTestSide.PROVIDER.getParticipantId();
private static final String CONSUMER_PARTICIPANT_ID = CeE2eTestSide.CONSUMER.getParticipantId();
private static final Random random = new Random();
private static final Random RANDOM = new Random();

@RegisterExtension
private static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down Expand Up @@ -699,7 +699,7 @@ void canMakeAnOnDemandDataSourceAvailable(
.contactPreferredEmailSubject("Subject")
.build())
.build())
.id("asset-" + random.nextInt())
.id("asset-" + RANDOM.nextInt())
.title("foo")
.build());

Expand Down Expand Up @@ -783,7 +783,7 @@ void canCreateDataOfferWithNewPolicy(
.type(DataSourceType.HTTP_DATA)
.build();

val assetId = "asset-" + random.nextInt();
val assetId = "asset-" + RANDOM.nextInt();
val asset = UiAssetCreateRequest.builder()
.dataSource(dataSource)
.id(assetId)
Expand Down Expand Up @@ -840,7 +840,7 @@ void canCreateDataOfferWithNewEmptyPolicyAndRestrictedPublishing(
.type(DataSourceType.HTTP_DATA)
.build();

val assetId = "asset-" + random.nextInt();
val assetId = "asset-" + RANDOM.nextInt();
val asset = UiAssetCreateRequest.builder()
.dataSource(dataSource)
.id(assetId)
Expand Down Expand Up @@ -924,7 +924,7 @@ void dontCreateAnythingIfThePolicyAlreadyExists(
@Provider EdcClient providerClient
) {
// arrange
val assetId = "assetId-" + random.nextInt();
val assetId = "assetId-" + RANDOM.nextInt();
scenario.createPolicy(assetId, OffsetDateTime.now(), OffsetDateTime.now());

// act
Expand Down Expand Up @@ -1025,7 +1025,7 @@ void reuseTheAlwaysTruePolicyWhenPublishingUnrestricted(
@Provider EdcClient providerClient
) {
// arrange
val assetId = "assetId-" + random.nextInt();
val assetId = "assetId-" + RANDOM.nextInt();

// act
providerClient.uiApi()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
public class CanGetAgreementPageForNonTerminatedContractTest {

@RegisterExtension
private final static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
public class CanGetAgreementPageForTerminatedContractTest {

@RegisterExtension
private final static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class CanTerminateFromConsumerTest {

@RegisterExtension
private final static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
public class CanTerminateFromProviderTest {

@RegisterExtension
private final static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import de.sovity.edc.client.EdcClient;
import de.sovity.edc.client.gen.ApiException;
import de.sovity.edc.client.gen.model.ContractAgreementPageQuery;
import de.sovity.edc.client.gen.model.ContractTerminationRequest;
import de.sovity.edc.client.gen.model.InitiateTransferRequest;
import de.sovity.edc.extension.e2e.connector.remotes.api_wrapper.E2eTestScenario;
Expand Down Expand Up @@ -44,8 +43,6 @@
import java.util.Map;
import java.util.stream.IntStream;

import static de.sovity.edc.client.gen.model.ContractTerminationStatus.ONGOING;
import static de.sovity.edc.client.gen.model.ContractTerminationStatus.TERMINATED;
import static de.sovity.edc.extension.contacttermination.ContractTerminationTestUtils.awaitTerminationCount;
import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand All @@ -56,7 +53,7 @@
class ContractTerminationTest {

@RegisterExtension
private final static CeE2eTestExtension e2eTestExtension = CeE2eTestExtension.builder()
private static final CeE2eTestExtension E2E_TEST_EXTENSION = CeE2eTestExtension.builder()
.additionalModule(":launchers:connectors:sovity-dev")
.build();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import lombok.Singular;
import lombok.experimental.Delegate;
import org.jetbrains.annotations.Nullable;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.extension.AfterAllCallback;
import org.junit.jupiter.api.extension.AfterEachCallback;
import org.junit.jupiter.api.extension.BeforeAllCallback;
Expand Down

0 comments on commit ff7da0b

Please sign in to comment.