Skip to content

Commit

Permalink
change test order
Browse files Browse the repository at this point in the history
  • Loading branch information
max402 committed May 19, 2024
1 parent 3f427cf commit d46e276
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import de.adorsys.opba.protocol.xs2a.service.xs2a.authenticate.embedded.Xs2aAisAuthenticateUserConsentWithPin;
import de.adorsys.opba.protocol.xs2a.service.xs2a.consent.CreateAisAccountListConsentService;
import de.adorsys.opba.protocol.xs2a.tests.e2e.stages.CommonGivenStages;
import de.adorsys.xs2a.adapter.api.config.AdapterConfig;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.assertj.core.api.Assertions;
Expand Down Expand Up @@ -361,6 +362,7 @@ public void setSandboxPortInAdapterConfig(int port) {
props.store(output, null);
}
Files.move(tempFile, resourcePath, StandardCopyOption.REPLACE_EXISTING);
AdapterConfig.reload();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
import de.adorsys.opba.protocol.xs2a.tests.e2e.wiremock.mocks.WiremockAccountInformationRequest;
import de.adorsys.opba.protocol.xs2a.tests.e2e.wiremock.mocks.Xs2aProtocolApplication;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.MethodOrderer;
import org.junit.jupiter.api.Order;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestMethodOrder;
import org.junit.jupiter.api.io.TempDir;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.CsvSource;
Expand Down Expand Up @@ -59,6 +62,7 @@
@Transactional(propagation = Propagation.NOT_SUPPORTED)
@SpringBootTest(classes = {Xs2aProtocolApplication.class, JGivenConfig.class}, webEnvironment = RANDOM_PORT)
@ActiveProfiles(profiles = {ONE_TIME_POSTGRES_RAMFS, MOCKED_SANDBOX})
@TestMethodOrder(MethodOrderer.OrderAnnotation.class)
class WiremockConsentE2EXs2aProtocolTest extends SpringScenarioTest<MockServers, WiremockAccountInformationRequest<? extends WiremockAccountInformationRequest<?>>, AccountInformationResult> {

private static final String OAUTH2_CODE = "2buKRxcMvi79w8xYLFaNsoyh";
Expand Down Expand Up @@ -132,6 +136,7 @@ void testIngAccountsListWithConsentUsingRedirect() {
}

@Test
@Order(1) // test should run before testDeutscheBank, because it's impossible to reinitialize static field URL_TO_CERTIFICATE of DeutscheBankPsuPasswordEncryptionService, which is needed to mock getCertificate call
void testPostbankAccountsListWithConsentUsingEmbedded() {
given()
.embedded_mock_of_postbank_for_max_musterman_accounts_running()
Expand Down

0 comments on commit d46e276

Please sign in to comment.