Skip to content

Commit 101436e

Browse files
committed
chore: migrate to github.com/hashicorp/[email protected]
1 parent 1ea7ad4 commit 101436e

File tree

296 files changed

+453
-438
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+453
-438
lines changed

.golangci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ linters:
112112
- varnamelen # checks that the length of a variable's name matches its scope [fast: false, auto-fix: false]
113113

114114
settings:
115+
depguard:
116+
rules:
117+
testing:
118+
files:
119+
- "**/*_test.go"
120+
deny:
121+
- pkg: "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
122+
desc: use github.com/hashicorp/terraform-plugin-testing/helper/acctest
123+
- pkg: "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
124+
desc: use github.com/hashicorp/terraform-plugin-testing/helper/resource
125+
- pkg: "github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
126+
desc: use github.com/hashicorp/terraform-plugin-testing/terraform
115127
govet:
116128
disable-all: true
117129
enable:

cmd/tftemplate/datasource_test.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package {{.API}}_test
44
import (
55
"testing"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
88
)
99

1010
func TestAccDataSource{{.Resource}}_Basic(t *testing.T) {

cmd/tftemplate/resource_test.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"testing"
77

8-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1010
"github.com/scaleway/scaleway-sdk-go/scw"
1111
)
1212

cmd/tftemplate/sweep.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"fmt"
66
"testing"
77

8-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
9-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
8+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
9+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1010
"github.com/scaleway/scaleway-sdk-go/scw"
1111
)
1212

cmd/tftemplate/sweep_test.go.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package {{.API}}_test
44
import (
55
"fmt"
66

7-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
7+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
88
)
99

1010
func init() {

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ require (
2525
github.com/hashicorp/terraform-plugin-log v0.9.0
2626
github.com/hashicorp/terraform-plugin-mux v0.20.0
2727
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
28+
github.com/hashicorp/terraform-plugin-testing v1.5.1
2829
github.com/nats-io/jwt/v2 v2.7.4
2930
github.com/nats-io/nats.go v1.44.0
3031
github.com/robfig/cron/v3 v3.0.1
@@ -153,7 +154,7 @@ require (
153154
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.22.0 // indirect
154155
go.opentelemetry.io/otel/metric v1.36.0 // indirect
155156
go.opentelemetry.io/otel/trace v1.36.0 // indirect
156-
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
157+
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 // indirect
157158
golang.org/x/mod v0.25.0 // indirect
158159
golang.org/x/net v0.41.0 // indirect
159160
golang.org/x/sync v0.16.0 // indirect

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ github.com/hashicorp/terraform-plugin-mux v0.20.0 h1:3QpBnI9uCuL0Yy2Rq/kR9cOdmOF
326326
github.com/hashicorp/terraform-plugin-mux v0.20.0/go.mod h1:wSIZwJjSYk86NOTX3fKUlThMT4EAV1XpBHz9SAvjQr4=
327327
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0 h1:NFPMacTrY/IdcIcnUB+7hsore1ZaRWU9cnB6jFoBnIM=
328328
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0/go.mod h1:QYmYnLfsosrxjCnGY1p9c7Zj6n9thnEE+7RObeYs3fA=
329+
github.com/hashicorp/terraform-plugin-testing v1.5.1 h1:T4aQh9JAhmWo4+t1A7x+rnxAJHCDIYW9kXyo4sVO92c=
330+
github.com/hashicorp/terraform-plugin-testing v1.5.1/go.mod h1:dg8clO6K59rZ8w9EshBmDp1CxTIPu3yA4iaDpX1h5u0=
329331
github.com/hashicorp/terraform-registry-address v0.2.5 h1:2GTftHqmUhVOeuu9CW3kwDkRe4pcBDq0uuK5VJngU1M=
330332
github.com/hashicorp/terraform-registry-address v0.2.5/go.mod h1:PpzXWINwB5kuVS5CA7m1+eO2f1jKb5ZDIxrOPfpnGkg=
331333
github.com/hashicorp/terraform-svchost v0.1.1 h1:EZZimZ1GxdqFRinZ1tpJwVxxt49xc/S52uzrw4x0jKQ=
@@ -560,8 +562,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0
560562
golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4=
561563
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM=
562564
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
563-
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df h1:UA2aFVmmsIlefxMk29Dp2juaUSth8Pyn3Tq5Y5mJGME=
564-
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
565+
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819 h1:EDuYyU/MkFXllv9QF9819VlI9a4tzGuCbhG0ExK9o1U=
566+
golang.org/x/exp v0.0.0-20230809150735-7b3493d9a819/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
565567
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
566568
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
567569
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=

internal/acctest/checks.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"net"
77
"regexp"
88

9-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
10-
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
9+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
10+
"github.com/hashicorp/terraform-plugin-testing/terraform"
1111
"github.com/scaleway/terraform-provider-scaleway/v2/internal/locality"
1212
)
1313

internal/acctest/fixtures.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package acctest
33
import (
44
"context"
55

6-
sdkacctest "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest"
76
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
7+
sdkacctest "github.com/hashicorp/terraform-plugin-testing/helper/acctest"
88
"github.com/scaleway/scaleway-sdk-go/api/account/v3"
99
iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
1010
"github.com/scaleway/terraform-provider-scaleway/v2/internal/meta"

internal/acctest/sweeper_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package acctest_test
33
import (
44
"testing"
55

6-
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
6+
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
77
"github.com/scaleway/terraform-provider-scaleway/v2/internal/acctest"
88
"github.com/stretchr/testify/assert"
99
)

0 commit comments

Comments
 (0)