Skip to content

Commit 6bd7d5d

Browse files
authored
tests(iam): change invited user email (#2162)
1 parent 5b960b3 commit 6bd7d5d

File tree

2 files changed

+35
-35
lines changed

2 files changed

+35
-35
lines changed

scaleway/resource_iam_user_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ func TestAccScalewayIamUser_Basic(t *testing.T) {
5757
{
5858
Config: `
5959
resource "scaleway_iam_user" "user_basic" {
60-
email = "user@example.com"
60+
email = "foo@scaleway.com"
6161
}
6262
`,
6363
Check: resource.ComposeTestCheckFunc(
6464
testAccCheckScalewayIamUserExists(tt, "scaleway_iam_user.user_basic"),
6565
testCheckResourceAttrUUID("scaleway_iam_user.user_basic", "id"),
66-
resource.TestCheckResourceAttr("scaleway_iam_user.user_basic", "email", "user@example.com"),
66+
resource.TestCheckResourceAttr("scaleway_iam_user.user_basic", "email", "foo@scaleway.com"),
6767
),
6868
},
6969
},

scaleway/testdata/iam-user-basic.cassette.yaml

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,27 @@
22
version: 1
33
interactions:
44
- request:
5-
body: '{"organization_id":"ff119889-7dc5-4b8f-a1c9-a01325b8431a","email":"user@example.com"}'
5+
body: '{"organization_id":"105bdce1-64c0-48ab-899d-868455867ecf","email":"foo@scaleway.com"}'
66
form: {}
77
headers:
88
Content-Type:
99
- application/json
1010
User-Agent:
11-
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.18.10; linux; amd64) terraform-provider/develop
11+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.21.1; linux; amd64) terraform-provider/develop
1212
terraform/terraform-tests
1313
url: https://api.scaleway.com/iam/v1alpha1/users
1414
method: POST
1515
response:
16-
body: '{"account_root_user_id":"","created_at":"2023-10-09T08:10:41.510678Z","deletable":true,"email":"user@example.com","id":"c0348a02-b444-4486-9c57-ef9bd7b52e09","last_login_at":null,"mfa":false,"organization_id":"ff119889-7dc5-4b8f-a1c9-a01325b8431a","status":"invitation_pending","two_factor_enabled":false,"type":"unknown_type","updated_at":"2023-10-09T08:10:41.510678Z"}'
16+
body: '{"account_root_user_id":"87e96904-46a8-4be7-829d-f0d6b7889f32","created_at":"2023-10-13T07:31:09.980437Z","deletable":true,"email":"foo@scaleway.com","id":"566f59f7-9d96-430e-9f75-8c3cb3c4c39b","last_login_at":null,"mfa":false,"organization_id":"105bdce1-64c0-48ab-899d-868455867ecf","status":"invitation_pending","two_factor_enabled":false,"type":"unknown_type","updated_at":"2023-10-13T07:31:09.980437Z"}'
1717
headers:
1818
Content-Length:
19-
- "370"
19+
- "406"
2020
Content-Security-Policy:
2121
- default-src 'none'; frame-ancestors 'none'
2222
Content-Type:
2323
- application/json
2424
Date:
25-
- Mon, 09 Oct 2023 08:10:41 GMT
25+
- Fri, 13 Oct 2023 07:31:10 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-
- c7d9ea18-7e2a-4eb1-b4f4-eda04dd80041
35+
- 62e7d8b4-3221-4f3a-a797-405b1b9f43c4
3636
status: 200 OK
3737
code: 200
3838
duration: ""
@@ -41,21 +41,21 @@ interactions:
4141
form: {}
4242
headers:
4343
User-Agent:
44-
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.18.10; linux; amd64) terraform-provider/develop
44+
- 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/iam/v1alpha1/users/c0348a02-b444-4486-9c57-ef9bd7b52e09
46+
url: https://api.scaleway.com/iam/v1alpha1/users/566f59f7-9d96-430e-9f75-8c3cb3c4c39b
4747
method: GET
4848
response:
49-
body: '{"account_root_user_id":"","created_at":"2023-10-09T08:10:41.510678Z","deletable":true,"email":"user@example.com","id":"c0348a02-b444-4486-9c57-ef9bd7b52e09","last_login_at":null,"mfa":false,"organization_id":"ff119889-7dc5-4b8f-a1c9-a01325b8431a","status":"invitation_pending","two_factor_enabled":false,"type":"guest","updated_at":"2023-10-09T08:10:41.510678Z"}'
49+
body: '{"account_root_user_id":"87e96904-46a8-4be7-829d-f0d6b7889f32","created_at":"2023-10-13T07:31:09.980437Z","deletable":true,"email":"foo@scaleway.com","id":"566f59f7-9d96-430e-9f75-8c3cb3c4c39b","last_login_at":null,"mfa":false,"organization_id":"105bdce1-64c0-48ab-899d-868455867ecf","status":"invitation_pending","two_factor_enabled":false,"type":"guest","updated_at":"2023-10-13T07:31:09.980437Z"}'
5050
headers:
5151
Content-Length:
52-
- "363"
52+
- "399"
5353
Content-Security-Policy:
5454
- default-src 'none'; frame-ancestors 'none'
5555
Content-Type:
5656
- application/json
5757
Date:
58-
- Mon, 09 Oct 2023 08:10:41 GMT
58+
- Fri, 13 Oct 2023 07:31:10 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-
- e7d4b1ac-17ce-483e-8b08-7b5ddd7b27d4
68+
- 4cf7c359-af86-4f9c-8066-2a7c1d22b4ae
6969
status: 200 OK
7070
code: 200
7171
duration: ""
@@ -74,21 +74,21 @@ interactions:
7474
form: {}
7575
headers:
7676
User-Agent:
77-
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.18.10; linux; amd64) terraform-provider/develop
77+
- 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/iam/v1alpha1/users/c0348a02-b444-4486-9c57-ef9bd7b52e09
79+
url: https://api.scaleway.com/iam/v1alpha1/users/566f59f7-9d96-430e-9f75-8c3cb3c4c39b
8080
method: GET
8181
response:
82-
body: '{"account_root_user_id":"","created_at":"2023-10-09T08:10:41.510678Z","deletable":true,"email":"user@example.com","id":"c0348a02-b444-4486-9c57-ef9bd7b52e09","last_login_at":null,"mfa":false,"organization_id":"ff119889-7dc5-4b8f-a1c9-a01325b8431a","status":"invitation_pending","two_factor_enabled":false,"type":"guest","updated_at":"2023-10-09T08:10:41.510678Z"}'
82+
body: '{"account_root_user_id":"87e96904-46a8-4be7-829d-f0d6b7889f32","created_at":"2023-10-13T07:31:09.980437Z","deletable":true,"email":"foo@scaleway.com","id":"566f59f7-9d96-430e-9f75-8c3cb3c4c39b","last_login_at":null,"mfa":false,"organization_id":"105bdce1-64c0-48ab-899d-868455867ecf","status":"invitation_pending","two_factor_enabled":false,"type":"guest","updated_at":"2023-10-13T07:31:09.980437Z"}'
8383
headers:
8484
Content-Length:
85-
- "363"
85+
- "399"
8686
Content-Security-Policy:
8787
- default-src 'none'; frame-ancestors 'none'
8888
Content-Type:
8989
- application/json
9090
Date:
91-
- Mon, 09 Oct 2023 08:10:41 GMT
91+
- Fri, 13 Oct 2023 07:31:10 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-
- 8ddffd1f-04d0-4371-a608-5999a27d1fa5
101+
- ddb72776-a9cd-480f-aa05-7253058f674b
102102
status: 200 OK
103103
code: 200
104104
duration: ""
@@ -107,21 +107,21 @@ interactions:
107107
form: {}
108108
headers:
109109
User-Agent:
110-
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.18.10; linux; amd64) terraform-provider/develop
110+
- 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/iam/v1alpha1/users/c0348a02-b444-4486-9c57-ef9bd7b52e09
112+
url: https://api.scaleway.com/iam/v1alpha1/users/566f59f7-9d96-430e-9f75-8c3cb3c4c39b
113113
method: GET
114114
response:
115-
body: '{"account_root_user_id":"","created_at":"2023-10-09T08:10:41.510678Z","deletable":true,"email":"user@example.com","id":"c0348a02-b444-4486-9c57-ef9bd7b52e09","last_login_at":null,"mfa":false,"organization_id":"ff119889-7dc5-4b8f-a1c9-a01325b8431a","status":"invitation_pending","two_factor_enabled":false,"type":"guest","updated_at":"2023-10-09T08:10:41.510678Z"}'
115+
body: '{"account_root_user_id":"87e96904-46a8-4be7-829d-f0d6b7889f32","created_at":"2023-10-13T07:31:09.980437Z","deletable":true,"email":"foo@scaleway.com","id":"566f59f7-9d96-430e-9f75-8c3cb3c4c39b","last_login_at":null,"mfa":false,"organization_id":"105bdce1-64c0-48ab-899d-868455867ecf","status":"invitation_pending","two_factor_enabled":false,"type":"guest","updated_at":"2023-10-13T07:31:09.980437Z"}'
116116
headers:
117117
Content-Length:
118-
- "363"
118+
- "399"
119119
Content-Security-Policy:
120120
- default-src 'none'; frame-ancestors 'none'
121121
Content-Type:
122122
- application/json
123123
Date:
124-
- Mon, 09 Oct 2023 08:10:42 GMT
124+
- Fri, 13 Oct 2023 07:31:10 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-
- 720ebcf3-e9d3-4177-a21f-81ae26ecc12b
134+
- 49d7e473-5cb4-4d15-97e1-28f211dd8f85
135135
status: 200 OK
136136
code: 200
137137
duration: ""
@@ -140,9 +140,9 @@ interactions:
140140
form: {}
141141
headers:
142142
User-Agent:
143-
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.18.10; linux; amd64) terraform-provider/develop
143+
- 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/iam/v1alpha1/users/c0348a02-b444-4486-9c57-ef9bd7b52e09
145+
url: https://api.scaleway.com/iam/v1alpha1/users/566f59f7-9d96-430e-9f75-8c3cb3c4c39b
146146
method: DELETE
147147
response:
148148
body: ""
@@ -152,7 +152,7 @@ interactions:
152152
Content-Type:
153153
- application/json
154154
Date:
155-
- Mon, 09 Oct 2023 08:10:42 GMT
155+
- Fri, 13 Oct 2023 07:31:11 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-
- aed4cfd8-998b-4808-a29f-8ccfa9da0d54
165+
- 2b05312e-2d3b-4eee-a8f9-fdd7125876c8
166166
status: 204 No Content
167167
code: 204
168168
duration: ""
@@ -171,12 +171,12 @@ interactions:
171171
form: {}
172172
headers:
173173
User-Agent:
174-
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.18.10; linux; amd64) terraform-provider/develop
174+
- 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/iam/v1alpha1/users/c0348a02-b444-4486-9c57-ef9bd7b52e09
176+
url: https://api.scaleway.com/iam/v1alpha1/users/566f59f7-9d96-430e-9f75-8c3cb3c4c39b
177177
method: GET
178178
response:
179-
body: '{"message":"resource is not found","resource":"iam_user","resource_id":"c0348a02-b444-4486-9c57-ef9bd7b52e09","type":"not_found"}'
179+
body: '{"message":"resource is not found","resource":"iam_user","resource_id":"566f59f7-9d96-430e-9f75-8c3cb3c4c39b","type":"not_found"}'
180180
headers:
181181
Content-Length:
182182
- "129"
@@ -185,7 +185,7 @@ interactions:
185185
Content-Type:
186186
- application/json
187187
Date:
188-
- Mon, 09 Oct 2023 08:10:42 GMT
188+
- Fri, 13 Oct 2023 07:31:11 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-
- 0d00ab19-1de9-4d84-abb9-546193523110
198+
- 1d31ed66-9084-447c-98bf-0c8538ff6760
199199
status: 404 Not Found
200200
code: 404
201201
duration: ""

0 commit comments

Comments
 (0)