mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 17:33:03 -05:00
test(cur): drop the isolation-only profiles that set the test default (#4240)
This commit is contained in:
1 parent
910f0922c9
commit
204e509e82
2 files changed
+5
-26
No files matched your search
-12
@@ -2,13 +2,9 @@ package io.github.hectorvent.floci.services.bcmdataexports;
|
||||
|
||||
import io.github.hectorvent.floci.testing.RestAssuredJsonUtils;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.junit.QuarkusTestProfile;
|
||||
import io.quarkus.test.junit.TestProfile;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
@@ -19,20 +15,12 @@ import static org.hamcrest.Matchers.*;
|
||||
* X-Amz-Target: AWSBillingAndCostManagementDataExports.<Action>
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestProfile(BcmDataExportsIntegrationTest.IsolatedProfile.class)
|
||||
class BcmDataExportsIntegrationTest {
|
||||
|
||||
private static final String CONTENT_TYPE = "application/x-amz-json-1.1";
|
||||
private static final String AUTH =
|
||||
"AWS4-HMAC-SHA256 Credential=AKID/20260101/us-east-1/bcm-data-exports/aws4_request";
|
||||
|
||||
public static final class IsolatedProfile implements QuarkusTestProfile {
|
||||
@Override
|
||||
public Map<String, String> getConfigOverrides() {
|
||||
return Map.of("floci.storage.mode", "memory");
|
||||
}
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
static void configureRestAssured() {
|
||||
RestAssuredJsonUtils.configureAwsContentTypes();
|
||||
|
||||
@@ -2,38 +2,29 @@ package io.github.hectorvent.floci.services.cur;
|
||||
|
||||
import io.github.hectorvent.floci.testing.RestAssuredJsonUtils;
|
||||
import io.quarkus.test.junit.QuarkusTest;
|
||||
import io.quarkus.test.junit.TestProfile;
|
||||
import io.quarkus.test.junit.QuarkusTestProfile;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
/**
|
||||
* Integration tests for the CUR management plane. Each test runs against a
|
||||
* dedicated profile so report-store state is isolated from sibling tests.
|
||||
* Integration tests for the CUR management plane. These run on the default test profile, so the
|
||||
* report store is shared with every other class in that profile group. What keeps the tests
|
||||
* independent is that each one uses its own report name and asserts on membership
|
||||
* ({@code hasItem}, {@code not(hasItem)}) rather than on how many definitions exist. An assertion
|
||||
* on the size of {@code ReportDefinitions} would not be safe here.
|
||||
*
|
||||
* Protocol: JSON 1.1 — Content-Type: application/x-amz-json-1.1,
|
||||
* X-Amz-Target: AWSOrigamiServiceGatewayService.<Action>
|
||||
*/
|
||||
@QuarkusTest
|
||||
@TestProfile(CurIntegrationTest.IsolatedProfile.class)
|
||||
class CurIntegrationTest {
|
||||
|
||||
private static final String CONTENT_TYPE = "application/x-amz-json-1.1";
|
||||
private static final String AUTH =
|
||||
"AWS4-HMAC-SHA256 Credential=AKID/20260101/us-east-1/cur/aws4_request";
|
||||
|
||||
public static final class IsolatedProfile implements QuarkusTestProfile {
|
||||
@Override
|
||||
public Map<String, String> getConfigOverrides() {
|
||||
return Map.of("floci.storage.mode", "memory");
|
||||
}
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
static void configureRestAssured() {
|
||||
RestAssuredJsonUtils.configureAwsContentTypes();
|
||||
|
||||
Reference in new issue
Block a user