mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
feat(ec2): list SUSE and Red Hat family images in the image catalog (#6193)
The EC2 image catalog carries the SUSE family (SLES, SLES for SAP, SUSE Multi-Linux Manager and openSUSE Leap) and the Red Hat family (RHEL and Rocky Linux) under their publishers' owner ids. DescribeImages finds each by owner and name.
This commit is contained in:
1 parent
9e3413980e
commit
8d73535826
4 files changed
+248
-1
No files matched your search
@@ -40,7 +40,27 @@ class Ec2ImageCatalogTest {
|
||||
"ami-ubuntu2404-cloud-arm64",
|
||||
"ami-debian12",
|
||||
"ami-alpine",
|
||||
"ami-0abcdef1234567893"), imageIds);
|
||||
"ami-0abcdef1234567893",
|
||||
"ami-opensuse-leap160",
|
||||
"ami-sles15sp4-byos",
|
||||
"ami-sles15sp5-byos",
|
||||
"ami-sles15sp6-byos",
|
||||
"ami-sles15sp7-byos",
|
||||
"ami-sles12sp5-byos",
|
||||
"ami-sles-sap15sp5",
|
||||
"ami-smlm-server51-x86-64",
|
||||
"ami-smlm-server51-arm64",
|
||||
"ami-smlm-proxy51-x86-64",
|
||||
"ami-smlm-proxy51-arm64",
|
||||
"ami-sles12sp5",
|
||||
"ami-sles15sp5",
|
||||
"ami-sles15sp6",
|
||||
"ami-sles15sp7",
|
||||
"ami-sles160",
|
||||
"ami-rocky9",
|
||||
"ami-rocky10",
|
||||
"ami-rhel8",
|
||||
"ami-rhel9"), imageIds);
|
||||
|
||||
assertTrue(imageCatalog.findByIdOrAlias("ami-amazonlinux2").isPresent());
|
||||
assertTrue(imageCatalog.findByIdOrAlias("ami-amazonlinux2023").isPresent());
|
||||
|
||||
@@ -8,6 +8,8 @@ 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.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.CsvSource;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -793,6 +795,33 @@ class Ec2IntegrationTest {
|
||||
.body("DescribeImagesResponse.imagesSet.item.architecture", everyItem(equalTo("arm64")));
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@Order(9)
|
||||
@CsvSource({
|
||||
"679593333241, openSUSE-Leap-16-0-*, ami-opensuse-leap160",
|
||||
"679593333241, suse-sles-15-sp6-byos-v*-hvm-ssd-x86_64, ami-sles15sp6-byos",
|
||||
"013907871322, suse-sles-15-sp6-v*-hvm-ssd-x86_64, ami-sles15sp6",
|
||||
"792107900819, Rocky-9-EC2-Base-9*, ami-rocky9",
|
||||
"309956199498, RHEL-9.5.0_HVM-*, ami-rhel9"
|
||||
})
|
||||
void describeImagesFindsSuseAndRedHatFamilyImagesByOwnerAndName(String owner, String name, String imageId) {
|
||||
given()
|
||||
.formParam("Action", "DescribeImages")
|
||||
.formParam("Owner.1", owner)
|
||||
.formParam("Filter.1.Name", "name")
|
||||
.formParam("Filter.1.Value.1", name)
|
||||
.formParam("Filter.2.Name", "architecture")
|
||||
.formParam("Filter.2.Value.1", "x86_64")
|
||||
.header("Authorization", AUTH_HEADER)
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("DescribeImagesResponse.imagesSet.item.size()", equalTo(1))
|
||||
.body("DescribeImagesResponse.imagesSet.item.imageId", equalTo(imageId))
|
||||
.body("DescribeImagesResponse.imagesSet.item.imageOwnerId", equalTo(owner));
|
||||
}
|
||||
|
||||
@Test
|
||||
@Order(9)
|
||||
void describeImagesWithAl2023Arm64Filters() {
|
||||
|
||||
Reference in new issue
Block a user