Skip to content

armgit / floci

Public Imported from GitHub
0

Light, fluffy, and always free - The AWS Local Emulator alternative

chore: import fully qualified types, lifecycle to verifiedpermissions (#6739)

Hector Ventura2eaf268727e9
diff --git a/src/main/java/io/github/hectorvent/floci/services/route53resolver/Route53ResolverJsonHandler.java b/src/main/java/io/github/hectorvent/floci/services/route53resolver/Route53ResolverJsonHandler.java
index 22cd3b17c7..ead3dfcd75 100644
--- a/src/main/java/io/github/hectorvent/floci/services/route53resolver/Route53ResolverJsonHandler.java
+++ b/src/main/java/io/github/hectorvent/floci/services/route53resolver/Route53ResolverJsonHandler.java
@@ -5,6 +5,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.github.hectorvent.floci.core.common.AwsErrorResponse;
+import io.github.hectorvent.floci.core.common.AwsException;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import jakarta.ws.rs.core.Response;
@@ -90,7 +91,7 @@ public class Route53ResolverJsonHandler {
"Unknown operation: Route53Resolver." + action))
.build();
};
- } catch (io.github.hectorvent.floci.core.common.AwsException e) {
+ } catch (AwsException e) {
return Response.status(e.getHttpStatus())
.entity(new AwsErrorResponse(e.jsonType(), e.getMessage())).build();
}
diff --git a/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminJsonHandler.java b/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminJsonHandler.java
index b8ae40c256..cf56262f14 100644
--- a/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminJsonHandler.java
+++ b/src/main/java/io/github/hectorvent/floci/services/ssoadmin/SsoAdminJsonHandler.java
@@ -266,7 +266,7 @@ public class SsoAdminJsonHandler {
return Response.ok(response).build();
}
- private ObjectNode trustedTokenIssuerMetadataNode(io.github.hectorvent.floci.services.ssoadmin.model.TrustedTokenIssuer issuer) {
+ private ObjectNode trustedTokenIssuerMetadataNode(TrustedTokenIssuer issuer) {
ObjectNode response = mapper.createObjectNode();
response.put("Name", issuer.name());
response.put("TrustedTokenIssuerArn", issuer.trustedTokenIssuerArn());
@@ -304,7 +304,7 @@ public class SsoAdminJsonHandler {
return Response.ok(response).build();
}
- private ObjectNode regionNode(io.github.hectorvent.floci.services.ssoadmin.model.RegionMetadata region) {
+ private ObjectNode regionNode(RegionMetadata region) {
ObjectNode response = mapper.createObjectNode();
response.put("AddedDate", service.regionAddedDateEpochSeconds(region));
response.put("IsPrimaryRegion", region.primaryRegion());
diff --git a/src/main/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutor.java b/src/main/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutor.java
index 2ffa86d776..a588d57c7e 100644
--- a/src/main/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutor.java
+++ b/src/main/java/io/github/hectorvent/floci/services/stepfunctions/AslExecutor.java
@@ -123,10 +123,12 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.BiConsumer;
import java.util.function.Consumer;
+import java.util.function.IntFunction;
import java.util.function.LongSupplier;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@@ -540,7 +542,7 @@ public class AslExecutor {
Future<?> f = executor.submit(() -> runUnderExecutionAccount(sm,
() -> doExecute(sm, exec, history, onUpdate, maxExecutionDeadlineNanos)));
f.get(maxExecutionDeadlineNanos - nanoTime.getAsLong(), TimeUnit.NANOSECONDS);
- } catch (java.util.concurrent.TimeoutException e) {
+ } catch (TimeoutException e) {
answerTimedOutUnlessEnded(exec, history, onUpdate);
} catch (Exception e) {
LOG.warnv("Sync execution wait failed for {0}: {1}", exec.getExecutionArn(), e.getMessage());
@@ -1103,7 +1105,7 @@ public class AslExecutor {
heartbeatDeadlineNanos(taskToken, heartbeatSeconds)));
try {
return future.get(wakeAtNanos - nanoTime.getAsLong(), TimeUnit.NANOSECONDS);
- } catch (java.util.concurrent.TimeoutException e) {
+ } catch (TimeoutException e) {
TokenWait decision = sfnService.get().expirePendingToken(taskToken, nanoTime.getAsLong(),
executionDeadlineNanos, timeoutDeadlineNanos, heartbeatSeconds);
if (decision.timeout() == TokenTimeout.CLAIMED) {
@@ -1716,7 +1718,7 @@ public class AslExecutor {
throw new FailStateException("Sfn.InvalidArnException",
"StateMachineArn is required for StartExecution");
}
- io.github.hectorvent.floci.services.stepfunctions.model.Execution exec;
+ Execution exec;
try {
exec = sfnService.get().startExecution(smArn, input.path("Name").asText(null),
sdkPayload(input.path("Input")), region);
@@ -1907,7 +1909,7 @@ public class AslExecutor {
throw new FailStateException("Sfn.InvalidArnException",
"StateMachineArn is required for StartSyncExecution");
}
- io.github.hectorvent.floci.services.stepfunctions.model.Execution exec;
+ Execution exec;
try {
exec = sfnService.get().startSyncExecution(smArn, input.path("Name").asText(null),
sdkPayload(input.path("Input")), region);
@@ -3269,7 +3271,7 @@ public class AslExecutor {
iterationChains.add(distributed ? HistoryChain.ofChildExecution() : chain.fork());
}
- java.util.function.IntFunction<Callable<JsonNode>> makeTask = (i) -> () -> {
+ IntFunction<Callable<JsonNode>> makeTask = (i) -> () -> {
HistoryChain iterationChain = iterationChains.get(i);
boolean batchedChild = batches != null;
JsonNode item = batchedChild ? batches.get(i) : items.get(i);
@@ -3354,7 +3356,7 @@ public class AslExecutor {
i -> () -> callUnderExecutionAccount(sm, makeTask.apply(i)),
executionDeadlineNanos,
i -> cutIteration(iterationChains.get(i), i, cutIterations));
- } catch (java.util.concurrent.TimeoutException e) {
+ } catch (TimeoutException e) {
// The only deadline the scheduler is given is the state machine's budget, so its
// expiry ends the execution rather than failing the Map state.
throw new ExecutionTimedOutException();
@@ -3881,10 +3883,10 @@ public class AslExecutor {
record.put("RedriveCount", 0);
record.put("RedriveStatus", "NOT_REDRIVABLE");
record.put("RedriveStatusReason", "Execution is SUCCEEDED and cannot be redriven");
- record.put("StartDate", java.time.Instant.ofEpochMilli(start).toString());
+ record.put("StartDate", Instant.ofEpochMilli(start).toString());
record.put("StateMachineArn", childSmArn);
record.put("Status", "SUCCEEDED");
- record.put("StopDate", java.time.Instant.ofEpochMilli(stop).toString());
+ record.put("StopDate", Instant.ofEpochMilli(stop).toString());
}
return out;
}
@@ -4293,7 +4295,7 @@ public class AslExecutor {
execution.put("Id", exec.getExecutionArn());
execution.put("Name", exec.getName());
execution.put("RoleArn", sm.getRoleArn());
- execution.put("StartTime", java.time.Instant.ofEpochMilli((long) (exec.getStartDate() * 1000)).toString());
+ execution.put("StartTime", Instant.ofEpochMilli((long) (exec.getStartDate() * 1000)).toString());
if (exec.getInput() != null) {
execution.set("Input", parseInput(exec.getInput()));
}
@@ -4313,7 +4315,7 @@ public class AslExecutor {
ObjectNode context = (ObjectNode) execContext;
ObjectNode state = objectMapper.createObjectNode();
state.put("Name", stateName);
- state.put("EnteredTime", java.time.Instant.now().toString());
+ state.put("EnteredTime", Instant.now().toString());
state.put("RetryCount", 0);
context.set("State", state);
}
@@ -5350,7 +5352,7 @@ public class AslExecutor {
yield objectMapper.getNodeFactory().booleanNode(contains);
}
case "States.UUID" -> {
- yield objectMapper.getNodeFactory().textNode(java.util.UUID.randomUUID().toString());
+ yield objectMapper.getNodeFactory().textNode(UUID.randomUUID().toString());
}
case "States.JsonMerge" -> {
List<String> parts = splitIntrinsicArgs(argsStr);
diff --git a/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsJsonHandler.java b/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsJsonHandler.java
index 87238bfc78..caf3a6b48f 100644
--- a/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsJsonHandler.java
+++ b/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsJsonHandler.java
@@ -1,10 +1,13 @@
package io.github.hectorvent.floci.services.verifiedpermissions;
+import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
+import io.github.hectorvent.floci.core.common.AwsException;
import io.github.hectorvent.floci.core.common.PaginatedResult;
+import io.github.hectorvent.floci.services.verifiedpermissions.model.EntityIdentifier;
import io.github.hectorvent.floci.services.verifiedpermissions.model.IdentitySource;
import io.github.hectorvent.floci.services.verifiedpermissions.model.Policy;
import io.github.hectorvent.floci.services.verifiedpermissions.model.PolicyStore;
@@ -15,6 +18,8 @@ import jakarta.inject.Inject;
import jakarta.ws.rs.core.Response;
import java.time.Instant;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -193,11 +198,11 @@ public class VerifiedPermissionsJsonHandler {
if (!parsed.isObject()) {
return List.of();
}
- java.util.ArrayList<String> names = new java.util.ArrayList<>();
+ ArrayList<String> names = new ArrayList<>();
parsed.fieldNames().forEachRemaining(names::add);
names.sort(String::compareTo);
return names;
- } catch (com.fasterxml.jackson.core.JsonProcessingException e) {
+ } catch (JsonProcessingException e) {
throw new IllegalStateException("Stored Verified Permissions schema is not valid JSON", e);
}
}
@@ -259,7 +264,7 @@ public class VerifiedPermissionsJsonHandler {
}
ObjectNode out = objectMapper.createObjectNode();
ArrayNode results = out.putArray("results");
- io.github.hectorvent.floci.services.verifiedpermissions.model.EntityIdentifier principal = null;
+ EntityIdentifier principal = null;
for (JsonNode item : requests) {
ObjectNode single = objectMapper.createObjectNode();
single.put("policyStoreId", storeIdentifier);
@@ -480,7 +485,7 @@ public class VerifiedPermissionsJsonHandler {
String policy = VerifiedPermissionsService.requiredText(item, "policyId");
try {
results.add(policyDetail(service.getPolicy(store, policy, region), region));
- } catch (io.github.hectorvent.floci.core.common.AwsException e) {
+ } catch (AwsException e) {
ObjectNode error = errors.addObject();
error.put("policyStoreId", store);
error.put("policyId", policy);
@@ -500,10 +505,10 @@ public class VerifiedPermissionsJsonHandler {
private boolean storeExists(String id, String region) {
try { service.getPolicyStore(id, region); return true; }
- catch (io.github.hectorvent.floci.core.common.AwsException e) { return false; }
+ catch (AwsException e) { return false; }
}
- private static void addEntity(ObjectNode out, String field, io.github.hectorvent.floci.services.verifiedpermissions.model.EntityIdentifier entity) {
+ private static void addEntity(ObjectNode out, String field, EntityIdentifier entity) {
if (entity == null) {
return;
}
@@ -548,7 +553,7 @@ public class VerifiedPermissionsJsonHandler {
if (!node.isObject()) {
throw VerifiedPermissionsService.validation("tags is required.");
}
- Map<String, String> out = new java.util.LinkedHashMap<>();
+ Map<String, String> out = new LinkedHashMap<>();
node.fields().forEachRemaining(e -> {
if (!e.getValue().isTextual()) {
throw VerifiedPermissionsService.validation("Tag values must be strings.");
@@ -562,7 +567,7 @@ public class VerifiedPermissionsJsonHandler {
if (!node.isArray()) {
throw VerifiedPermissionsService.validation("tagKeys is required.");
}
- java.util.ArrayList<String> out = new java.util.ArrayList<>();
+ ArrayList<String> out = new ArrayList<>();
node.forEach(v -> {
if (!v.isTextual()) {
throw VerifiedPermissionsService.validation("tagKeys must contain strings.");
diff --git a/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsService.java b/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsService.java
index ae99c5afce..19691611c0 100644
--- a/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsService.java
+++ b/src/main/java/io/github/hectorvent/floci/services/verifiedpermissions/VerifiedPermissionsService.java
@@ -33,6 +33,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import java.util.TreeMap;
import java.util.UUID;
import java.util.regex.Pattern;
@@ -740,7 +741,7 @@ public class VerifiedPermissionsService implements Resettable {
private String requestFingerprint(JsonNode request) {
JsonNode copy = request.deepCopy();
if (copy.isObject()) {
- ((com.fasterxml.jackson.databind.node.ObjectNode) copy).remove("clientToken");
+ ((ObjectNode) copy).remove("clientToken");
}
try {
return canonical(copy);
@@ -751,7 +752,7 @@ public class VerifiedPermissionsService implements Resettable {
private String canonical(JsonNode node) throws JsonProcessingException {
if (node.isObject()) {
- java.util.TreeMap<String, JsonNode> sorted = new java.util.TreeMap<>();
+ TreeMap<String, JsonNode> sorted = new TreeMap<>();
node.fields().forEachRemaining(e -> sorted.put(e.getKey(), e.getValue()));
StringBuilder b = new StringBuilder("{");
boolean first = true;
@@ -1077,7 +1078,7 @@ public class VerifiedPermissionsService implements Resettable {
if (node == null || !node.isObject()) {
throw validation("The Cedar schema must be a JSON object.");
}
- } catch (io.github.hectorvent.floci.core.common.AwsException e) {
+ } catch (AwsException e) {
throw e;
} catch (Exception e) {
throw validation("The Cedar schema is invalid: " + safeMessage(e));
diff --git a/src/test/java/io/github/hectorvent/floci/lifecycle/EmulatorLifecycleTest.java b/src/test/java/io/github/hectorvent/floci/lifecycle/EmulatorLifecycleTest.java
index 3e5f1a2610..f12364f995 100644
--- a/src/test/java/io/github/hectorvent/floci/lifecycle/EmulatorLifecycleTest.java
+++ b/src/test/java/io/github/hectorvent/floci/lifecycle/EmulatorLifecycleTest.java
@@ -7,6 +7,7 @@ import io.github.hectorvent.floci.core.storage.PersistentPathValidator;
import io.github.hectorvent.floci.core.storage.StorageFactory;
import io.github.hectorvent.floci.lifecycle.inithook.InitializationHook;
import io.github.hectorvent.floci.lifecycle.inithook.InitializationHooksRunner;
+import io.github.hectorvent.floci.services.amazonmq.container.RabbitMqManager;
import io.github.hectorvent.floci.services.appsync.graphql.SchemaCreationWorker;
import io.github.hectorvent.floci.services.docdb.container.DocDbContainerManager;
import io.github.hectorvent.floci.services.dynamodb.DynamoDbRuntime;
@@ -20,12 +21,17 @@ import io.github.hectorvent.floci.services.elasticache.ElastiCacheService;
import io.github.hectorvent.floci.services.elasticache.container.ElastiCacheContainerManager;
import io.github.hectorvent.floci.services.elasticache.container.ElastiCacheMemcachedContainerManager;
import io.github.hectorvent.floci.services.elasticache.proxy.ElastiCacheProxyManager;
+import io.github.hectorvent.floci.services.elb.ElbClassicService;
+import io.github.hectorvent.floci.services.elbv2.ElbV2Service;
import io.github.hectorvent.floci.services.floci.ui.FlociUiManager;
import io.github.hectorvent.floci.services.iam.IamService;
+import io.github.hectorvent.floci.services.kinesisanalytics.container.FlinkContainerManager;
import io.github.hectorvent.floci.services.lambda.DynamoDbStreamsEventSourcePoller;
import io.github.hectorvent.floci.services.lambda.KinesisEventSourcePoller;
import io.github.hectorvent.floci.services.lambda.SqsEventSourcePoller;
import io.github.hectorvent.floci.services.lambda.durable.DurableExecutionService;
+import io.github.hectorvent.floci.services.memorydb.container.MemoryDbContainerManager;
+import io.github.hectorvent.floci.services.memorydb.proxy.MemoryDbProxyManager;
import io.github.hectorvent.floci.services.neptune.container.NeptuneContainerManager;
import io.github.hectorvent.floci.services.neptune.proxy.NeptuneProxyManager;
import io.github.hectorvent.floci.services.pipes.PipesService;
@@ -55,9 +61,13 @@ import org.mockito.junit.jupiter.MockitoExtension;
import java.io.IOException;
import java.text.MessageFormat;
+import java.util.Collections;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.logging.Handler;
+import java.util.logging.LogRecord;
+import java.util.logging.Logger;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
@@ -92,18 +102,18 @@ class EmulatorLifecycleTest {
@Mock private ElastiCacheProxyManager elastiCacheProxyManager;
@Mock private RdsContainerManager rdsContainerManager;
@Mock private RdsProxyManager rdsProxyManager;
- @Mock private io.github.hectorvent.floci.services.memorydb.container.MemoryDbContainerManager memoryDbContainerManager;
- @Mock private io.github.hectorvent.floci.services.memorydb.proxy.MemoryDbProxyManager memoryDbProxyManager;
+ @Mock private MemoryDbContainerManager memoryDbContainerManager;
+ @Mock private MemoryDbProxyManager memoryDbProxyManager;
@Mock private DocDbContainerManager docDbContainerManager;
@Mock private NeptuneContainerManager neptuneContainerManager;
@Mock private NeptuneProxyManager neptuneProxyManager;
- @Mock private io.github.hectorvent.floci.services.amazonmq.container.RabbitMqManager rabbitMqManager;
- @Mock private io.github.hectorvent.floci.services.kinesisanalytics.container.FlinkContainerManager flinkContainerManager;
+ @Mock private RabbitMqManager rabbitMqManager;
+ @Mock private FlinkContainerManager flinkContainerManager;
@Mock private RdsService rdsService;
@Mock private TimestreamInfluxDbService timestreamInfluxDbService;
@Mock private EmulatorConfig.TimestreamInfluxDbServiceConfig timestreamInfluxDbServiceConfig;
- @Mock private io.github.hectorvent.floci.services.elbv2.ElbV2Service elbV2Service;
- @Mock private io.github.hectorvent.floci.services.elb.ElbClassicService elbClassicService;
+ @Mock private ElbV2Service elbV2Service;
+ @Mock private ElbClassicService elbClassicService;
@Mock private EcsService ecsService;
@Mock private EksService eksService;
@Mock private InitializationHooksRunner initializationHooksRunner;
@@ -170,7 +180,7 @@ class EmulatorLifecycleTest {
persistentPathValidator,
dynamoDbRuntime, redshiftZeroEtlConsumer, eksService);
Mockito.lenient().when(containerTeardowns.iterator())
- .thenReturn(java.util.Collections.emptyIterator());
+ .thenReturn(Collections.emptyIterator());
}
private void stubStorageConfig() {
@@ -754,12 +764,11 @@ class EmulatorLifecycleTest {
/** Collects the messages EmulatorLifecycle logs while {@code action} runs. */
private List<String> lifecycleLogMessages(Runnable action) {
- java.util.logging.Logger logger =
- java.util.logging.Logger.getLogger(EmulatorLifecycle.class.getName());
+ Logger logger = Logger.getLogger(EmulatorLifecycle.class.getName());
List<String> messages = new CopyOnWriteArrayList<>();
- java.util.logging.Handler handler = new java.util.logging.Handler() {
+ Handler handler = new Handler() {
@Override
- public void publish(java.util.logging.LogRecord logRecord) {
+ public void publish(LogRecord logRecord) {
Object[] parameters = logRecord.getParameters();
messages.add(parameters == null || parameters.length == 0
? logRecord.getMessage()
diff --git a/src/test/java/io/github/hectorvent/floci/services/lakeformation/LakeFormationResourceRaceTest.java b/src/test/java/io/github/hectorvent/floci/services/lakeformation/LakeFormationResourceRaceTest.java
index b8b4966e6c..35d434db04 100644
--- a/src/test/java/io/github/hectorvent/floci/services/lakeformation/LakeFormationResourceRaceTest.java
+++ b/src/test/java/io/github/hectorvent/floci/services/lakeformation/LakeFormationResourceRaceTest.java
@@ -1,5 +1,6 @@
package io.github.hectorvent.floci.services.lakeformation;
+import io.github.hectorvent.floci.core.common.AwsException;
import io.github.hectorvent.floci.core.storage.AccountAwareStorageBackend;
import io.github.hectorvent.floci.core.storage.StorageFactory;
import io.github.hectorvent.floci.services.lakeformation.model.ResourceInfo;
@@ -63,7 +64,7 @@ class LakeFormationResourceRaceTest {
await(start);
try {
storage.updateResource(REGION, RESOURCE_ARN, UPDATE_ROLE, null, null, null);
- } catch (io.github.hectorvent.floci.core.common.AwsException expected) {
+ } catch (AwsException expected) {
if (!"EntityNotFoundException".equals(expected.getErrorCode())) {
unexpected.set(expected);
}
diff --git a/src/test/java/io/github/hectorvent/floci/services/resourceexplorer2/ResourceExplorer2PaginationTest.java b/src/test/java/io/github/hectorvent/floci/services/resourceexplorer2/ResourceExplorer2PaginationTest.java
index 571807f246..8a39cb70ba 100644
--- a/src/test/java/io/github/hectorvent/floci/services/resourceexplorer2/ResourceExplorer2PaginationTest.java
+++ b/src/test/java/io/github/hectorvent/floci/services/resourceexplorer2/ResourceExplorer2PaginationTest.java
@@ -1,5 +1,6 @@
package io.github.hectorvent.floci.services.resourceexplorer2;
+import io.github.hectorvent.floci.core.common.AwsException;
import org.junit.jupiter.api.Test;
import java.util.Base64;
@@ -65,13 +66,13 @@ class ResourceExplorer2PaginationTest {
@Test
void garbageTokenIsRejected() {
- assertThrows(io.github.hectorvent.floci.core.common.AwsException.class,
+ assertThrows(AwsException.class,
() -> ResourceExplorer2Service.pageBounds(50, 10, "!!!not-base64!!!", CAP));
}
@Test
void negativeTokenOffsetIsRejected() {
- assertThrows(io.github.hectorvent.floci.core.common.AwsException.class,
+ assertThrows(AwsException.class,
() -> ResourceExplorer2Service.pageBounds(50, 10, token(-1), CAP));
}
diff --git a/src/test/java/io/github/hectorvent/floci/services/sns/SnsServiceTest.java b/src/test/java/io/github/hectorvent/floci/services/sns/SnsServiceTest.java
index bbb7714ff7..9aae85465a 100644
--- a/src/test/java/io/github/hectorvent/floci/services/sns/SnsServiceTest.java
+++ b/src/test/java/io/github/hectorvent/floci/services/sns/SnsServiceTest.java
@@ -604,8 +604,8 @@ class SnsServiceTest {
void publish_messagePlusAttributesExceedsLimit_throwsInvalidParameter() {
Topic topic = snsService.createTopic("size-topic", null, null, REGION);
String body = "x".repeat(262_100);
- Map<String, io.github.hectorvent.floci.services.sqs.model.MessageAttributeValue> attrs = Map.of(
- "longAttribute", new io.github.hectorvent.floci.services.sqs.model.MessageAttributeValue(
+ Map<String, MessageAttributeValue> attrs = Map.of(
+ "longAttribute", new MessageAttributeValue(
"y".repeat(200), "String"));
AwsException ex = assertThrows(AwsException.class, () ->
snsService.publish(topic.getTopicArn(), null, null, body, null, attrs, REGION));
@@ -1014,10 +1014,10 @@ class SnsServiceTest {
@Test
void filterPolicy_messageAttributes_unchanged() {
Subscription sub = subscriptionWithPolicy("{\"event\":[\"order\"]}", null);
- Map<String, io.github.hectorvent.floci.services.sqs.model.MessageAttributeValue> matching = Map.of(
- "event", new io.github.hectorvent.floci.services.sqs.model.MessageAttributeValue("order", "String"));
- Map<String, io.github.hectorvent.floci.services.sqs.model.MessageAttributeValue> nonMatching = Map.of(
- "event", new io.github.hectorvent.floci.services.sqs.model.MessageAttributeValue("refund", "String"));
+ Map<String, MessageAttributeValue> matching = Map.of(
+ "event", new MessageAttributeValue("order", "String"));
+ Map<String, MessageAttributeValue> nonMatching = Map.of(
+ "event", new MessageAttributeValue("refund", "String"));
assertTrue(snsService.matchesFilterPolicy(sub, null, matching));
assertFalse(snsService.matchesFilterPolicy(sub, null, nonMatching));
}
diff --git a/tools/checkstyle/suppressions.xml b/tools/checkstyle/suppressions.xml
index 143fb524d8..7a6a35ec8c 100644
--- a/tools/checkstyle/suppressions.xml
+++ b/tools/checkstyle/suppressions.xml
@@ -61,7 +61,6 @@
<suppress id="NoFqcn" files="/core/common/docker/DockerHostResolver\.java$"/>
<suppress id="NoFqcn" files="/core/common/port/RuntimeApiPortPoolDefaultTest\.java$"/>
<suppress id="NoFqcn" files="/lifecycle/EmulatorInfoControllerIntegrationTest\.java$"/>
- <suppress id="NoFqcn" files="/lifecycle/EmulatorLifecycleTest\.java$"/>
<suppress id="NoFqcn" files="/services/account/AccountAlternateContactIntegrationTest\.java$"/>
<suppress id="NoFqcn" files="/services/amazonmq/container/RabbitMqManager\.java$"/>
<suppress id="NoFqcn" files="/services/apigateway/ApiGatewayAwsIntegrationTest\.java$"/>
@@ -278,7 +277,6 @@
<suppress id="NoFqcn" files="/services/kms/KmsJsonHandler\.java$"/>
<suppress id="NoFqcn" files="/services/kms/KmsServiceTest\.java$"/>
<suppress id="NoFqcn" files="/services/kms/KmsService\.java$"/>
- <suppress id="NoFqcn" files="/services/lakeformation/LakeFormationResourceRaceTest\.java$"/>
<suppress id="NoFqcn" files="/services/lakeformation/LakeFormationService\.java$"/>
<suppress id="NoFqcn" files="/services/lakeformation/MemoryLakeFormationStorage\.java$"/>
<suppress id="NoFqcn" files="/services/lambda/ApiGatewayController\.java$"/>
@@ -330,7 +328,6 @@
<suppress id="NoFqcn" files="/services/route53/Route53Service\.java$"/>
<suppress id="NoFqcn" files="/services/route53/Route53VpcAssociationIntegrationTest\.java$"/>
<suppress id="NoFqcn" files="/services/route53/Route53VpcAssociationTransientErrorIntegrationTest\.java$"/>
- <suppress id="NoFqcn" files="/services/route53resolver/Route53ResolverJsonHandler\.java$"/>
<suppress id="NoFqcn" files="/services/s3/S3Controller\.java$"/>
<suppress id="NoFqcn" files="/services/s3/S3CopyObjectSourcePermissionIntegrationTest\.java$"/>
<suppress id="NoFqcn" files="/services/s3/S3CorsIntegrationTest\.java$"/>
@@ -378,17 +375,14 @@
<suppress id="NoFqcn" files="/services/signin/SigninServiceTest\.java$"/>
<suppress id="NoFqcn" files="/services/sns/SnsHttpDeliveryIntegrationTest\.java$"/>
<suppress id="NoFqcn" files="/services/sns/SnsQueryHandler\.java$"/>
- <suppress id="NoFqcn" files="/services/sns/SnsServiceTest\.java$"/>
<suppress id="NoFqcn" files="/services/sns/SnsService\.java$"/>
<suppress id="NoFqcn" files="/services/ssm/SsmIntegrationTest\.java$"/>
<suppress id="NoFqcn" files="/services/ssoadmin/SsoAdminAssignmentsIntegrationTest\.java$"/>
- <suppress id="NoFqcn" files="/services/ssoadmin/SsoAdminJsonHandler\.java$"/>
<suppress id="NoFqcn" files="/services/ssoadmin/SsoAdminService\.java$"/>
<suppress id="NoFqcn" files="/services/ssoadmin/model/PermissionSet\.java$"/>
<suppress id="NoFqcn" files="/services/ssooidc/SsoOidcIntegrationTest\.java$"/>
<suppress id="NoFqcn" files="/services/ssooidc/SsoOidcServiceTest\.java$"/>
<suppress id="NoFqcn" files="/services/stepfunctions/AslExecutorIntrinsicContextTest\.java$"/>
- <suppress id="NoFqcn" files="/services/stepfunctions/AslExecutor\.java$"/>
<suppress id="NoFqcn" files="/services/stepfunctions/MapIterationSchedulerTest\.java$"/>
<suppress id="NoFqcn" files="/services/stepfunctions/StepFunctionsJsonHandler\.java$"/>
<suppress id="NoFqcn" files="/services/stepfunctions/StepFunctionsServicePersistenceTest\.java$"/>
@@ -399,9 +393,7 @@
<suppress id="NoFqcn" files="/services/transcribe/TranscribeServiceTest\.java$"/>
<suppress id="NoFqcn" files="/services/transfer/TransferServiceTest\.java$"/>
<suppress id="NoFqcn" files="/services/verifiedpermissions/VerifiedPermissionsIntegrationTest\.java$"/>
- <suppress id="NoFqcn" files="/services/verifiedpermissions/VerifiedPermissionsJsonHandler\.java$"/>
<suppress id="NoFqcn" files="/services/verifiedpermissions/VerifiedPermissionsOidcSignatureVerifier\.java$"/>
- <suppress id="NoFqcn" files="/services/verifiedpermissions/VerifiedPermissionsService\.java$"/>
<suppress id="NoFqcn" files="/services/verifiedpermissions/VerifiedPermissionsTokenService\.java$"/>
<suppress id="NoFqcn" files="/tools/ami/AmiImageTool\.java$"/>
</suppressions>