Skip to content

Commit 9afb8a3

Browse files
committed
test: fix mocked requests
1 parent f97d40b commit 9afb8a3

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

builder/hcloud/step_create_server_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ func TestStepCreateServer(t *testing.T) {
6363
"meta": { "pagination": { "page": 1 }}
6464
}`,
6565
},
66-
{Method: "GET", Path: "/firewalls/actions?page=1&status=running",
66+
{Method: "GET", Path: "/firewalls/actions?page=1&per_page=50&status=running",
6767
Status: 200,
6868
JSONRaw: `{
6969
"actions": [],
@@ -139,7 +139,7 @@ func TestStepCreateServer(t *testing.T) {
139139
"meta": { "pagination": { "page": 1 }}
140140
}`,
141141
},
142-
{Method: "GET", Path: "/firewalls/actions?page=1&status=running",
142+
{Method: "GET", Path: "/firewalls/actions?page=1&per_page=50&status=running",
143143
Status: 200,
144144
JSONRaw: `{
145145
"actions": [],
@@ -209,7 +209,7 @@ func TestStepCreateServer(t *testing.T) {
209209
"meta": { "pagination": { "page": 1 }}
210210
}`,
211211
},
212-
{Method: "GET", Path: "/firewalls/actions?page=1&status=running",
212+
{Method: "GET", Path: "/firewalls/actions?page=1&per_page=50&status=running",
213213
Status: 200,
214214
JSONRaw: `{
215215
"actions": [],
@@ -310,7 +310,7 @@ func TestStepCreateServer(t *testing.T) {
310310
"meta": { "pagination": { "page": 1 }}
311311
}`,
312312
},
313-
{Method: "GET", Path: "/firewalls/actions?page=1&status=running",
313+
{Method: "GET", Path: "/firewalls/actions?page=1&per_page=50&status=running",
314314
Status: 200,
315315
JSONRaw: `{
316316
"actions": [],
@@ -416,7 +416,7 @@ func TestStepCreateServer(t *testing.T) {
416416
"meta": { "pagination": { "page": 1 }}
417417
}`,
418418
},
419-
{Method: "GET", Path: "/firewalls/actions?page=1&status=running",
419+
{Method: "GET", Path: "/firewalls/actions?page=1&per_page=50&status=running",
420420
Status: 200,
421421
JSONRaw: `{
422422
"actions": [],

builder/hcloud/step_pre_validate_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestStepPreValidate(t *testing.T) {
4040
}`,
4141
},
4242
{
43-
Method: "GET", Path: "/images?architecture=x86&page=1&type=snapshot",
43+
Method: "GET", Path: "/images?architecture=x86&page=1&per_page=50&type=snapshot",
4444
Status: 200,
4545
JSONRaw: `{
4646
"images": []
@@ -82,7 +82,7 @@ func TestStepPreValidate(t *testing.T) {
8282
}`,
8383
},
8484
{
85-
Method: "GET", Path: "/images?architecture=x86&page=1&type=snapshot",
85+
Method: "GET", Path: "/images?architecture=x86&page=1&per_page=50&type=snapshot",
8686
Status: 200,
8787
JSONRaw: `{
8888
"images": [{ "id": 1, "description": "dummy-snapshot"}]
@@ -129,7 +129,7 @@ func TestStepPreValidate(t *testing.T) {
129129
}`,
130130
},
131131
{
132-
Method: "GET", Path: "/images?architecture=x86&page=1&type=snapshot",
132+
Method: "GET", Path: "/images?architecture=x86&page=1&per_page=50&type=snapshot",
133133
Status: 200,
134134
JSONRaw: `{
135135
"images": [{ "id": 1, "description": "dummy-snapshot"}]

0 commit comments

Comments
 (0)