mirror of
https://github.com/floci-io/floci.git
synced 2026-12-06 11:38:06 -05:00
feat(marketplace-catalog): emulate AWS Marketplace Catalog API (#3338)
This commit is contained in:
1 parent
9a2a89399a
commit
50fa334dc5
17 files changed
+1295
-2
No files matched your search
@@ -38,6 +38,7 @@ import software.amazon.awssdk.services.identitystore.IdentitystoreClient;
|
||||
import software.amazon.awssdk.services.budgets.BudgetsClient;
|
||||
import software.amazon.awssdk.services.macie2.Macie2Client;
|
||||
import software.amazon.awssdk.services.controlcatalog.ControlCatalogClient;
|
||||
import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient;
|
||||
import software.amazon.awssdk.services.inspector2.Inspector2Client;
|
||||
import software.amazon.awssdk.services.securityhub.SecurityHubClient;
|
||||
import software.amazon.awssdk.services.detective.DetectiveClient;
|
||||
@@ -359,6 +360,14 @@ public final class TestFixtures {
|
||||
.build();
|
||||
}
|
||||
|
||||
public static MarketplaceCatalogClient marketplaceCatalogClient() {
|
||||
return MarketplaceCatalogClient.builder()
|
||||
.endpointOverride(ENDPOINT)
|
||||
.region(REGION)
|
||||
.credentialsProvider(CREDENTIALS)
|
||||
.build();
|
||||
}
|
||||
|
||||
public static DetectiveClient detectiveClient(String accountId) {
|
||||
return DetectiveClient.builder()
|
||||
.endpointOverride(ENDPOINT)
|
||||
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.floci.test;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import software.amazon.awssdk.services.marketplacecatalog.MarketplaceCatalogClient;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
|
||||
class MarketplaceCatalogTest {
|
||||
|
||||
@Test
|
||||
void usesAwsSdkWireContract() {
|
||||
try (MarketplaceCatalogClient client = TestFixtures.marketplaceCatalogClient()) {
|
||||
var response = client.listEntities(r -> r.catalog("AWSMarketplace").entityType("SaaSProduct"));
|
||||
assertNotNull(response.entitySummaryList());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user