Skip to content

Commit e48e03a

Browse files
author
Lingxi Chen
committed
more yaml tests
Signed-off-by: Lingxi Chen <[email protected]>
1 parent f7b1003 commit e48e03a

File tree

1 file changed

+70
-9
lines changed
  • rest-api-spec/src/main/resources/rest-api-spec/test/wlm_stats

1 file changed

+70
-9
lines changed

rest-api-spec/src/main/resources/rest-api-spec/test/wlm_stats/10_basic.yml

Lines changed: 70 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,74 @@
6363
error.reason: "Invalid value for 'order'. Allowed: 'asc', 'desc'"
6464

6565
---
66-
"Invalid token returns 400":
67-
- skip:
68-
version: " - 3.0.0"
69-
reason: "wlm_stats_list API added after 3.0.0"
70-
- do:
71-
catch: bad_request
72-
wlm_stats_list:
73-
next_token: "abcdef123456"
66+
"Invalid token returns 400":
67+
- skip:
68+
version: " - 3.0.0"
69+
reason: "wlm_stats_list API added after 3.0.0"
70+
- do:
71+
catch: bad_request
72+
wlm_stats_list:
73+
next_token: "abcdef123456"
74+
75+
- match: { error: "Pagination state has changed (e.g., new workload groups added or removed). Please restart pagination from the beginning by omitting the 'next_token' parameter." }
76+
77+
---
78+
"Default request returns 200 and contains expected keys":
79+
- skip:
80+
version: " - 3.0.0"
81+
reason: "wlm_stats_list API added after 3.0.0"
82+
- do:
83+
wlm_stats_list:
84+
v: true
85+
- is_true: $body
86+
- match:
87+
$body: /WORKLOAD_GROUP_ID/
88+
89+
---
90+
"Max allowed size param returns success":
91+
- skip:
92+
version: " - 3.0.0"
93+
reason: "wlm_stats_list API added after 3.0.0"
94+
- do:
95+
wlm_stats_list:
96+
size: 100
97+
- is_true: $body
98+
99+
---
100+
"Too large page size returns error":
101+
- skip:
102+
version: " - 3.0.0"
103+
reason: "wlm_stats_list API added after 3.0.0"
104+
- do:
105+
catch: bad_request
106+
wlm_stats_list:
107+
size: 1000
108+
- match:
109+
error: "Invalid value for 'size'. Allowed range: 1 to 100"
110+
111+
---
112+
"Negative page size returns error":
113+
- skip:
114+
version: " - 3.0.0"
115+
reason: "wlm_stats_list API added after 3.0.0"
116+
- do:
117+
catch: bad_request
118+
wlm_stats_list:
119+
size: -1
120+
- match:
121+
error.reason: "Invalid value for 'size'. Allowed range: 1 to 100"
122+
123+
124+
---
125+
"Sort param omitted uses default 'node_id'":
126+
- skip:
127+
version: " - 3.0.0"
128+
reason: "wlm_stats_list API added after 3.0.0"
129+
- do:
130+
wlm_stats_list:
131+
size: 1
132+
v: true
133+
- is_true: $body
134+
- match:
135+
$body: /NODE_ID/
74136

75-
- match: { error: "Pagination state has changed (e.g., new workload groups added or removed). Please restart pagination from the beginning by omitting the 'next_token' parameter." }

0 commit comments

Comments
 (0)