Skip to content

Commit b92b289

Browse files
authored
tests: fix tests in ci and remove nl-ams region (#2260)
* ci: fix Jobs tests * remove nl-ams region
1 parent f6f377e commit b92b289

File tree

5 files changed

+79
-82
lines changed

5 files changed

+79
-82
lines changed

.github/workflows/acceptance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- Instance
2525
- Iot
2626
- IPAM
27-
- Jobs
27+
- Job
2828
- K8S
2929
- Lb
3030
- Marketplace

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- Instance
2626
- Iot
2727
- IPAM
28-
- Jobs
28+
- Job
2929
- K8S
3030
- Lb
3131
- Marketplace

scaleway/resource_job_definition_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ func TestAccScalewayJobDefinition_Basic(t *testing.T) {
6161
cpu_limit = 120
6262
memory_limit = 256
6363
image_uri = "docker.io/alpine:latest"
64-
region = "nl-ams"
6564
}
6665
`,
6766
Check: resource.ComposeTestCheckFunc(
@@ -91,7 +90,6 @@ func TestAccScalewayJobDefinition_Timeout(t *testing.T) {
9190
memory_limit = 256
9291
image_uri = "docker.io/alpine:latest"
9392
timeout = "20m"
94-
region = "nl-ams"
9593
}
9694
`,
9795
Check: resource.ComposeTestCheckFunc(
@@ -109,7 +107,6 @@ func TestAccScalewayJobDefinition_Timeout(t *testing.T) {
109107
memory_limit = 256
110108
image_uri = "docker.io/alpine:latest"
111109
timeout = "1h30m"
112-
region = "nl-ams"
113110
}
114111
`,
115112
Check: resource.ComposeTestCheckFunc(

scaleway/testdata/job-definition-basic.cassette.yaml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,19 @@ interactions:
1010
User-Agent:
1111
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
1212
terraform/terraform-tests
13-
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions
13+
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions
1414
method: POST
1515
response:
16-
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-27T08:38:49.922682Z","description":"","environment_variables":{},"id":"f9485584-ad18-481f-933e-6e88666ee760","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"nl-ams","updated_at":null}'
16+
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-29T16:31:04.330108Z","description":"","environment_variables":{},"id":"88f97b47-51c0-4674-9fda-cb1ce99467fe","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"fr-par","updated_at":null}'
1717
headers:
1818
Content-Length:
19-
- "369"
19+
- "381"
2020
Content-Security-Policy:
2121
- default-src 'none'; frame-ancestors 'none'
2222
Content-Type:
2323
- application/json
2424
Date:
25-
- Mon, 27 Nov 2023 08:38:50 GMT
25+
- Wed, 29 Nov 2023 16:31:04 GMT
2626
Server:
2727
- Scaleway API-Gateway
2828
Strict-Transport-Security:
@@ -32,7 +32,7 @@ interactions:
3232
X-Frame-Options:
3333
- DENY
3434
X-Request-Id:
35-
- afa10c9b-27cf-4f90-ba07-d1785b497659
35+
- 16199102-3140-42e6-916e-19f2093f3890
3636
status: 200 OK
3737
code: 200
3838
duration: ""
@@ -43,19 +43,19 @@ interactions:
4343
User-Agent:
4444
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
4545
terraform/terraform-tests
46-
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
46+
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
4747
method: GET
4848
response:
49-
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-27T08:38:49.922682Z","description":"","environment_variables":{},"id":"f9485584-ad18-481f-933e-6e88666ee760","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"nl-ams","updated_at":null}'
49+
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-29T16:31:04.330108Z","description":"","environment_variables":{},"id":"88f97b47-51c0-4674-9fda-cb1ce99467fe","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"fr-par","updated_at":null}'
5050
headers:
5151
Content-Length:
52-
- "369"
52+
- "381"
5353
Content-Security-Policy:
5454
- default-src 'none'; frame-ancestors 'none'
5555
Content-Type:
5656
- application/json
5757
Date:
58-
- Mon, 27 Nov 2023 08:38:50 GMT
58+
- Wed, 29 Nov 2023 16:31:04 GMT
5959
Server:
6060
- Scaleway API-Gateway
6161
Strict-Transport-Security:
@@ -65,7 +65,7 @@ interactions:
6565
X-Frame-Options:
6666
- DENY
6767
X-Request-Id:
68-
- 759b246c-aad1-4013-81d0-c1985f6bc516
68+
- 0037f2fb-7279-4323-bc45-03acfe270052
6969
status: 200 OK
7070
code: 200
7171
duration: ""
@@ -76,19 +76,19 @@ interactions:
7676
User-Agent:
7777
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
7878
terraform/terraform-tests
79-
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
79+
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
8080
method: GET
8181
response:
82-
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-27T08:38:49.922682Z","description":"","environment_variables":{},"id":"f9485584-ad18-481f-933e-6e88666ee760","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"nl-ams","updated_at":null}'
82+
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-29T16:31:04.330108Z","description":"","environment_variables":{},"id":"88f97b47-51c0-4674-9fda-cb1ce99467fe","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"fr-par","updated_at":null}'
8383
headers:
8484
Content-Length:
85-
- "369"
85+
- "381"
8686
Content-Security-Policy:
8787
- default-src 'none'; frame-ancestors 'none'
8888
Content-Type:
8989
- application/json
9090
Date:
91-
- Mon, 27 Nov 2023 08:38:50 GMT
91+
- Wed, 29 Nov 2023 16:31:04 GMT
9292
Server:
9393
- Scaleway API-Gateway
9494
Strict-Transport-Security:
@@ -98,7 +98,7 @@ interactions:
9898
X-Frame-Options:
9999
- DENY
100100
X-Request-Id:
101-
- c89d2afd-27a9-4767-8e51-30d89ebcf274
101+
- e3466cfd-ec64-4c9b-95f9-21a94e3d71c3
102102
status: 200 OK
103103
code: 200
104104
duration: ""
@@ -109,19 +109,19 @@ interactions:
109109
User-Agent:
110110
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
111111
terraform/terraform-tests
112-
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
112+
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
113113
method: GET
114114
response:
115-
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-27T08:38:49.922682Z","description":"","environment_variables":{},"id":"f9485584-ad18-481f-933e-6e88666ee760","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"nl-ams","updated_at":null}'
115+
body: '{"command":"","cpu_limit":120,"created_at":"2023-11-29T16:31:04.330108Z","description":"","environment_variables":{},"id":"88f97b47-51c0-4674-9fda-cb1ce99467fe","image_uri":"docker.io/alpine:latest","job_timeout":"21600s","memory_limit":256,"name":"test-jobs-job-definition-basic","project_id":"ee7bd9e1-9cbd-4724-b2f4-19e50f3cf38b","region":"fr-par","updated_at":null}'
116116
headers:
117117
Content-Length:
118-
- "369"
118+
- "381"
119119
Content-Security-Policy:
120120
- default-src 'none'; frame-ancestors 'none'
121121
Content-Type:
122122
- application/json
123123
Date:
124-
- Mon, 27 Nov 2023 08:38:50 GMT
124+
- Wed, 29 Nov 2023 16:31:05 GMT
125125
Server:
126126
- Scaleway API-Gateway
127127
Strict-Transport-Security:
@@ -131,7 +131,7 @@ interactions:
131131
X-Frame-Options:
132132
- DENY
133133
X-Request-Id:
134-
- 6894a05c-7746-4a8b-a884-0b2338182531
134+
- 697e1ef3-af0c-4609-9f50-9be564372c7a
135135
status: 200 OK
136136
code: 200
137137
duration: ""
@@ -142,7 +142,7 @@ interactions:
142142
User-Agent:
143143
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
144144
terraform/terraform-tests
145-
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
145+
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
146146
method: DELETE
147147
response:
148148
body: ""
@@ -152,7 +152,7 @@ interactions:
152152
Content-Type:
153153
- application/json
154154
Date:
155-
- Mon, 27 Nov 2023 08:38:51 GMT
155+
- Wed, 29 Nov 2023 16:31:06 GMT
156156
Server:
157157
- Scaleway API-Gateway
158158
Strict-Transport-Security:
@@ -162,7 +162,7 @@ interactions:
162162
X-Frame-Options:
163163
- DENY
164164
X-Request-Id:
165-
- b845448e-6a00-4d49-a262-f3082fc9c837
165+
- 1f52ce46-01be-48d4-88af-f4cac9460102
166166
status: 204 No Content
167167
code: 204
168168
duration: ""
@@ -173,7 +173,7 @@ interactions:
173173
User-Agent:
174174
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
175175
terraform/terraform-tests
176-
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
176+
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
177177
method: DELETE
178178
response:
179179
body: '{"message":"job definition is not found"}'
@@ -185,7 +185,7 @@ interactions:
185185
Content-Type:
186186
- application/json
187187
Date:
188-
- Mon, 27 Nov 2023 08:38:51 GMT
188+
- Wed, 29 Nov 2023 16:31:06 GMT
189189
Server:
190190
- Scaleway API-Gateway
191191
Strict-Transport-Security:
@@ -195,7 +195,7 @@ interactions:
195195
X-Frame-Options:
196196
- DENY
197197
X-Request-Id:
198-
- 186fc083-a757-4a54-b0f3-5319087de025
198+
- 915399c5-3ebd-4172-980b-a489518fa767
199199
status: 404 Not Found
200200
code: 404
201201
duration: ""

0 commit comments

Comments
 (0)