mirror of
https://github.com/floci-io/floci.git
synced 2026-12-04 10:38:00 -05:00
fix(athena): align ListWorkGroups with AWS behavior (#1259)
This commit is contained in:
1 parent
94ad081241
commit
8c2d18b1d0
3 files changed
+68
-3
No files matched your search
+35
@@ -6,6 +6,7 @@ import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static io.restassured.RestAssured.given;
|
||||
import static org.hamcrest.Matchers.contains;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
||||
@QuarkusTest
|
||||
@@ -66,6 +67,40 @@ class AthenaCreateWorkGroupIntegrationTest {
|
||||
.body("message", equalTo("WorkGroup already exists"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void listWorkGroupsIncludesCreatedWorkGroupAlongsidePrimary() {
|
||||
given()
|
||||
.header("X-Amz-Target", "AmazonAthena.CreateWorkGroup")
|
||||
.contentType(CONTENT_TYPE)
|
||||
.body("""
|
||||
{
|
||||
"Name": "analytics-list",
|
||||
"Description": "analytics workgroup for reporting queries",
|
||||
"Configuration": {
|
||||
"ResultConfiguration": {
|
||||
"OutputLocation": "s3://test-bucket/athena-results/"
|
||||
}
|
||||
}
|
||||
}
|
||||
""")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200);
|
||||
|
||||
given()
|
||||
.header("X-Amz-Target", "AmazonAthena.ListWorkGroups")
|
||||
.contentType(CONTENT_TYPE)
|
||||
.body("{}")
|
||||
.when()
|
||||
.post("/")
|
||||
.then()
|
||||
.statusCode(200)
|
||||
.body("WorkGroups.size()", equalTo(2))
|
||||
.body("WorkGroups.Name", contains("primary", "analytics-list"))
|
||||
.body("WorkGroups.State", contains("ENABLED", "ENABLED"));
|
||||
}
|
||||
|
||||
@Test
|
||||
void createWorkGroupRejectsPrimaryWorkGroup() {
|
||||
given()
|
||||
|
||||
Reference in new issue
Block a user