Skip to content

Commit

Permalink
add IT
Browse files Browse the repository at this point in the history
Signed-off-by: Ruirui Zhang <mariazrr@amazon.com>
  • Loading branch information
ruai0511 committed Aug 15, 2024
1 parent 384314b commit cdf1925
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 24 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"query_group_context": {
"stability": "experimental",
"url": {
"paths": [
{
"path": "/_wlm/query_group",
"methods": ["PUT", "POST", "GET"],
"parts": {}
},
{
"path": "/_wlm/query_group/{name}",
"methods": [
"GET"
],
"parts": {
"name": {
"type": "string",
"description": "QueryGroup name"
}
}
}
]
},
"params":{},
"body":{
"description":"The QueryGroup schema"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
reason: "QueryGroup WorkloadManagement feature was added in 2.17"

- do:
create_query_group_context:
query_group_context:
body:
{
"name": "analytics",
Expand All @@ -22,7 +22,7 @@

- do:
catch: /illegal_argument_exception/
create_query_group_context:
query_group_context:
body:
{
"name": "analytics",
Expand All @@ -35,7 +35,7 @@

- do:
catch: /illegal_argument_exception/
create_query_group_context:
query_group_context:
body:
{
"name": "analytics2",
Expand All @@ -48,7 +48,7 @@

- do:
catch: /illegal_argument_exception/
create_query_group_context:
query_group_context:
body:
{
"name": "analytics2",
Expand All @@ -61,7 +61,7 @@

- do:
catch: /illegal_argument_exception/
create_query_group_context:
query_group_context:
body:
{
"name": "",
Expand All @@ -73,7 +73,7 @@
}

- do:
create_query_group_context:
query_group_context:
body:
{
"name": "analytics2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
"test get QueryGroup API":
- skip:
version: " - 2.16.99"
reason: "QueryGroup WorkloadManagement feature was added in 2.17"

- do:
query_group_context:
body:
{
"name": "analytics",
"resiliency_mode": "monitor",
"resource_limits": {
"cpu": 0.4,
"memory": 0.2
}
}

- match: { name: "analytics" }
- match: { resiliency_mode: "monitor" }
- match: { resource_limits.cpu: 0.4 }
- match: { resource_limits.memory: 0.2 }

- do:
query_group_context:
name: "analytics"

- match: { query_groups.0.name: "analytics" }
- match: { query_groups.0.resiliency_mode: "monitor" }
- match: { query_groups.0.resource_limits.cpu: 0.4 }
- match: { query_groups.0.resource_limits.memory: 0.2 }

- do:
catch: /illegal_argument_exception/
query_group_context:
name: "analytics1"

- do:
query_group_context:
body:
{
"name": "analytics2",
"resiliency_mode": "monitor",
"resource_limits": {
"cpu": 0.1,
"memory": 0.1
}
}

- match: { name: "analytics2" }
- match: { resiliency_mode: "monitor" }
- match: { resource_limits.cpu: 0.1 }
- match: { resource_limits.memory: 0.1 }

- do:
query_group_context:

- match: { query_groups.0.name: ["analytics", "analytics2"] }

0 comments on commit cdf1925

Please sign in to comment.