Skip to content

Commit 122db31

Browse files
committed
Fix some tests
1 parent 0071bad commit 122db31

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

internal/meta/extractors.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ func ExtractZone(d terraformResourceData, m any) (scw.Zone, error) {
3838
return scw.ParseZone(rawConfig.AsString())
3939
}
4040
}
41+
4142
rawZone, exist := d.GetOk("zone")
4243
if exist {
4344
return scw.ParseZone(rawZone.(string))
@@ -61,6 +62,7 @@ func ExtractRegion(d terraformResourceData, m any) (scw.Region, error) {
6162
return scw.ParseRegion(rawConfig.AsString())
6263
}
6364
}
65+
6466
rawRegion, exist := d.GetOk("region")
6567
if exist {
6668
return scw.ParseRegion(rawRegion.(string))
@@ -85,6 +87,7 @@ func ExtractRegionWithDefault(d terraformResourceData, m any, defaultRegion scw.
8587
return scw.ParseRegion(rawConfig.AsString())
8688
}
8789
}
90+
8891
rawRegion, exist := d.GetOk("region")
8992
if exist {
9093
return scw.ParseRegion(rawRegion.(string))
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
version: 2
3+
interactions:
4+
- id: 0
5+
request:
6+
proto: HTTP/1.1
7+
proto_major: 1
8+
proto_minor: 1
9+
content_length: 0
10+
transfer_encoding: []
11+
trailer: {}
12+
host: api.scaleway.com
13+
remote_addr: ""
14+
request_uri: ""
15+
body: ""
16+
form: {}
17+
headers:
18+
User-Agent:
19+
- scaleway-sdk-go/v1.0.0-beta.7+dev (go1.25.1; darwin; arm64) terraform-provider/develop terraform/terraform-tests
20+
url: https://api.scaleway.com/instance/v1/zones/fr-par-1/ips/65a60f6b-fa89-4e49-bc25-fced17fa3df3
21+
method: GET
22+
response:
23+
proto: HTTP/2.0
24+
proto_major: 2
25+
proto_minor: 0
26+
transfer_encoding: []
27+
trailer: {}
28+
content_length: 365
29+
uncompressed: false
30+
body: '{"ip":{"address":"51.15.236.240","id":"65a60f6b-fa89-4e49-bc25-fced17fa3df3","ipam_id":"c6282852-e659-4072-826d-37f253693648","organization":"105bdce1-64c0-48ab-899d-868455867ecf","prefix":null,"project":"105bdce1-64c0-48ab-899d-868455867ecf","reverse":null,"server":null,"state":"detached","tags":[],"type":"routed_ipv4","zone":"fr-par-1"}}'
31+
headers:
32+
Content-Length:
33+
- "365"
34+
Content-Security-Policy:
35+
- default-src 'none'; frame-ancestors 'none'
36+
Content-Type:
37+
- application/json
38+
Date:
39+
- Wed, 17 Sep 2025 17:41:41 GMT
40+
Server:
41+
- Scaleway API Gateway (fr-par-2;edge02)
42+
Strict-Transport-Security:
43+
- max-age=63072000
44+
X-Content-Type-Options:
45+
- nosniff
46+
X-Frame-Options:
47+
- DENY
48+
X-Request-Id:
49+
- 218c4ae8-78af-4ffa-a81a-f6a58d7a766b
50+
status: 200 OK
51+
code: 200
52+
duration: 149.750417ms

0 commit comments

Comments
 (0)