Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024 07 24 fix tests #1009

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@ void test_migrated_policy_working_test_legacy_policy_working(
assertThat(migratedAlwaysTruePolicy.getType()).isEqualTo(UiPolicyExpressionType.EMPTY);
assertThat(migratedAlwaysTruePolicy.getConstraint()).isNull();

testTransfer(scenario, mockServer, providerClient, consumerClient);
testTransfer(scenario, mockServer, consumerClient, providerClient);
testTransfer(scenario, mockServer, consumerClient);
}

public void testTransfer(E2eScenario scenario, ClientAndServer mockServer, EdcClient providerClient, EdcClient consumerClient) {
public static void testTransfer(E2eScenario scenario, ClientAndServer mockServer, EdcClient consumerClient) {
// arrange
val destinationPath = "/destination/some/path/";
val destinationUrl = "http://localhost:" + mockServer.getPort() + destinationPath;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package de.sovity.edc.e2e;

import de.sovity.edc.client.EdcClient;
import de.sovity.edc.extension.e2e.extension.Consumer;
import de.sovity.edc.extension.e2e.extension.E2eScenario;
import de.sovity.edc.extension.e2e.extension.E2eTestExtension;
import de.sovity.edc.extension.e2e.extension.Provider;
import de.sovity.edc.extension.utils.junit.DisabledOnGithub;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.mockserver.integration.ClientAndServer;

import static de.sovity.edc.e2e.AlwaysTrueMigrationTest.testTransfer;
import static org.assertj.core.api.Assertions.assertThat;

class AlwaysTrueMigrationTestReversed {

@RegisterExtension
private static final E2eTestExtension E2E_TEST_EXTENSION = E2eTestExtension.builder()
.additionalConsumerMigrationLocation("classpath:db/additional-test-data/always-true-policy-legacy")
.additionalProviderMigrationLocation("classpath:db/additional-test-data/always-true-policy-migrated")
.build();

@Test
@DisabledOnGithub
void test_migrated_policy_working_test_legacy_policy_working(
E2eScenario scenario,
ClientAndServer mockServer,
@Provider EdcClient providerClient,
@Consumer EdcClient consumerClient
) {
// assert correct policies
testTransfer(scenario, mockServer, consumerClient);
}
}
Loading