You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reference: https://pkg.go.dev/math/rand#Seed
Reference: #1245
Previously from `golangci-lint` after Go 1.20 upgrade:
```
helper/acctest/random.go:24:2: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (staticcheck)
rand.Seed(time.Now().UTC().UnixNano())
^
```
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ When running provider tests, Terraform 0.12.26 or later is needed for version 2.
18
18
19
19
This project follows the [support policy](https://golang.org/doc/devel/release.html#policy) of Go as its support policy. The two latest major releases of Go are supported by the project.
20
20
21
-
Currently, that means Go **1.19** or later must be used when including this project as a dependency.
21
+
Currently, that means Go **1.20** or later must be used when including this project as a dependency.
Copy file name to clipboardexpand all lines: website/docs/plugin/sdkv2/testing/acceptance-tests/index.mdx
+13-11
Original file line number
Diff line number
Diff line change
@@ -142,7 +142,7 @@ Create a [GitHub Actions workflow](https://docs.github.com/en/actions/using-work
142
142
143
143
Use the [`matrix`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstrategymatrix) strategy for more advanced configuration, such as running acceptance testing against multiple Terraform CLI versions.
144
144
145
-
The following example workflow runs acceptance testing for the provider using the latest patch versions of Go 1.19 and Terraform CLI 1.3:
145
+
The following example workflow runs acceptance testing for the provider using the latest patch versions of Go defined in the `go.mod` file and Terraform CLI 1.5:
146
146
147
147
```yaml
148
148
name: Terraform Provider Tests
@@ -163,12 +163,12 @@ jobs:
163
163
runs-on: ubuntu-latest
164
164
steps:
165
165
- uses: actions/checkout@v3
166
-
- uses: actions/setup-go@v3
166
+
- uses: actions/setup-go@v4
167
167
with:
168
-
go-version: '1.19'
168
+
go-version-file: 'go.mod'
169
169
- uses: hashicorp/setup-terraform@v2
170
170
with:
171
-
terraform_version: '1.3.*'
171
+
terraform_version: '1.5.*'
172
172
terraform_wrapper: false
173
173
- run: go test -v -cover ./...
174
174
env:
@@ -178,14 +178,14 @@ jobs:
178
178
runs-on: ubuntu-latest
179
179
steps:
180
180
- uses: actions/checkout@v3
181
-
- uses: actions/setup-go@v3
181
+
- uses: actions/setup-go@v4
182
182
with:
183
-
go-version: '1.19'
183
+
go-version-file: 'go.mod'
184
184
- run: go test -v -cover ./...
185
185
```
186
186
187
187
188
-
The following example workflow runs acceptance testing for the provider using the latest patch versions of Go 1.19 and Terraform CLI 0.12 through 1.3:
188
+
The following example workflow runs acceptance testing for the provider using the latest patch versions of Go defined in the `go.mod` file and Terraform CLI 0.12 through 1.5:
0 commit comments