Skip to content

Commit

Permalink
tests: fix tests in ci and remove nl-ams region (#2260)
Browse files Browse the repository at this point in the history
* ci: fix Jobs tests

* remove nl-ams region
  • Loading branch information
Codelax authored Nov 29, 2023
1 parent f6f377e commit b92b289
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 82 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/acceptance-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- Instance
- Iot
- IPAM
- Jobs
- Job
- K8S
- Lb
- Marketplace
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- Instance
- Iot
- IPAM
- Jobs
- Job
- K8S
- Lb
- Marketplace
Expand Down
3 changes: 0 additions & 3 deletions scaleway/resource_job_definition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ func TestAccScalewayJobDefinition_Basic(t *testing.T) {
cpu_limit = 120
memory_limit = 256
image_uri = "docker.io/alpine:latest"
region = "nl-ams"
}
`,
Check: resource.ComposeTestCheckFunc(
Expand Down Expand Up @@ -91,7 +90,6 @@ func TestAccScalewayJobDefinition_Timeout(t *testing.T) {
memory_limit = 256
image_uri = "docker.io/alpine:latest"
timeout = "20m"
region = "nl-ams"
}
`,
Check: resource.ComposeTestCheckFunc(
Expand All @@ -109,7 +107,6 @@ func TestAccScalewayJobDefinition_Timeout(t *testing.T) {
memory_limit = 256
image_uri = "docker.io/alpine:latest"
timeout = "1h30m"
region = "nl-ams"
}
`,
Check: resource.ComposeTestCheckFunc(
Expand Down
52 changes: 26 additions & 26 deletions scaleway/testdata/job-definition-basic.cassette.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ interactions:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
terraform/terraform-tests
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions
method: POST
response:
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}'
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}'
headers:
Content-Length:
- "369"
- "381"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Mon, 27 Nov 2023 08:38:50 GMT
- Wed, 29 Nov 2023 16:31:04 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
Expand All @@ -32,7 +32,7 @@ interactions:
X-Frame-Options:
- DENY
X-Request-Id:
- afa10c9b-27cf-4f90-ba07-d1785b497659
- 16199102-3140-42e6-916e-19f2093f3890
status: 200 OK
code: 200
duration: ""
Expand All @@ -43,19 +43,19 @@ interactions:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
terraform/terraform-tests
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
method: GET
response:
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}'
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}'
headers:
Content-Length:
- "369"
- "381"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Mon, 27 Nov 2023 08:38:50 GMT
- Wed, 29 Nov 2023 16:31:04 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
Expand All @@ -65,7 +65,7 @@ interactions:
X-Frame-Options:
- DENY
X-Request-Id:
- 759b246c-aad1-4013-81d0-c1985f6bc516
- 0037f2fb-7279-4323-bc45-03acfe270052
status: 200 OK
code: 200
duration: ""
Expand All @@ -76,19 +76,19 @@ interactions:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
terraform/terraform-tests
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
method: GET
response:
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}'
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}'
headers:
Content-Length:
- "369"
- "381"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Mon, 27 Nov 2023 08:38:50 GMT
- Wed, 29 Nov 2023 16:31:04 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
Expand All @@ -98,7 +98,7 @@ interactions:
X-Frame-Options:
- DENY
X-Request-Id:
- c89d2afd-27a9-4767-8e51-30d89ebcf274
- e3466cfd-ec64-4c9b-95f9-21a94e3d71c3
status: 200 OK
code: 200
duration: ""
Expand All @@ -109,19 +109,19 @@ interactions:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
terraform/terraform-tests
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
method: GET
response:
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}'
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}'
headers:
Content-Length:
- "369"
- "381"
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'
Content-Type:
- application/json
Date:
- Mon, 27 Nov 2023 08:38:50 GMT
- Wed, 29 Nov 2023 16:31:05 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
Expand All @@ -131,7 +131,7 @@ interactions:
X-Frame-Options:
- DENY
X-Request-Id:
- 6894a05c-7746-4a8b-a884-0b2338182531
- 697e1ef3-af0c-4609-9f50-9be564372c7a
status: 200 OK
code: 200
duration: ""
Expand All @@ -142,7 +142,7 @@ interactions:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
terraform/terraform-tests
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
method: DELETE
response:
body: ""
Expand All @@ -152,7 +152,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 27 Nov 2023 08:38:51 GMT
- Wed, 29 Nov 2023 16:31:06 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
Expand All @@ -162,7 +162,7 @@ interactions:
X-Frame-Options:
- DENY
X-Request-Id:
- b845448e-6a00-4d49-a262-f3082fc9c837
- 1f52ce46-01be-48d4-88af-f4cac9460102
status: 204 No Content
code: 204
duration: ""
Expand All @@ -173,7 +173,7 @@ interactions:
User-Agent:
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
terraform/terraform-tests
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/nl-ams/job-definitions/f9485584-ad18-481f-933e-6e88666ee760
url: https://api.scaleway.com/serverless-jobs/v1alpha1/regions/fr-par/job-definitions/88f97b47-51c0-4674-9fda-cb1ce99467fe
method: DELETE
response:
body: '{"message":"job definition is not found"}'
Expand All @@ -185,7 +185,7 @@ interactions:
Content-Type:
- application/json
Date:
- Mon, 27 Nov 2023 08:38:51 GMT
- Wed, 29 Nov 2023 16:31:06 GMT
Server:
- Scaleway API-Gateway
Strict-Transport-Security:
Expand All @@ -195,7 +195,7 @@ interactions:
X-Frame-Options:
- DENY
X-Request-Id:
- 186fc083-a757-4a54-b0f3-5319087de025
- 915399c5-3ebd-4172-980b-a489518fa767
status: 404 Not Found
code: 404
duration: ""
Loading

0 comments on commit b92b289

Please sign in to comment.