aztfmod / terraform-provider-azurecaf

Terraform provider for the Terraform platform engineering for Azure
173 stars 92 forks source link

Fix tests with Terraform v1.0.1 #115

Closed rcoy-v closed 3 years ago

rcoy-v commented 3 years ago

Running tests while using Terraform v1.0.1, will result in the following errors:

go test -count 1 ./...                                                                                                                                                                                                                        09:34:33 AM
?       github.com/aztfmod/terraform-provider-azurecaf  [no test files]
--- FAIL: TestAccResourceName_CafClassic (4.24s)
    resource_name_test.go:95: Step 1/4 error: unsupported state format version: expected "0.1", got "0.2"
    testing_new.go:56: Error retrieving state, there may be dangling resources: unsupported state format version: expected "0.1", got "0.2"
--- FAIL: TestAccResourceName_CafClassicRSV (3.92s)
    resource_name_test.go:154: Step 1/1 error: unsupported state format version: expected "0.1", got "0.2"
    testing_new.go:56: Error retrieving state, there may be dangling resources: unsupported state format version: expected "0.1", got "0.2"
--- FAIL: TestAccCafNamingConvention_Classic (3.92s)
    resource_naming_convention_cafclassic_test.go:11: Step 1/1 error: unsupported state format version: expected "0.1", got "0.2"
    testing_new.go:56: Error retrieving state, there may be dangling resources: unsupported state format version: expected "0.1", got "0.2"
--- FAIL: TestAccCafNamingConventionCaf_Random (3.98s)
    resource_naming_convention_cafrandom_test.go:11: Step 1/1 error: unsupported state format version: expected "0.1", got "0.2"
    testing_new.go:56: Error retrieving state, there may be dangling resources: unsupported state format version: expected "0.1", got "0.2"
--- FAIL: TestAccCafNamingConvention_Passthrough (3.95s)
    resource_naming_convention_passthrough_test.go:11: Step 1/1 error: unsupported state format version: expected "0.1", got "0.2"
    testing_new.go:56: Error retrieving state, there may be dangling resources: unsupported state format version: expected "0.1", got "0.2"
--- FAIL: TestAccCafNamingConventionFull_Random (3.89s)
    resource_naming_convention_random_test.go:11: Step 1/1 error: unsupported state format version: expected "0.1", got "0.2"
    testing_new.go:56: Error retrieving state, there may be dangling resources: unsupported state format version: expected "0.1", got "0.2"
FAIL
FAIL    github.com/aztfmod/terraform-provider-azurecaf/azurecaf 24.210s
?       github.com/aztfmod/terraform-provider-azurecaf/completness  [no test files]
FAIL

This issue is fixed by updating to a newer version of the terraform-plugin-sdk. Details in changelog https://github.com/hashicorp/terraform-plugin-sdk/blob/main/CHANGELOG.md#270-june-25-2021.

This pull request also commits go.sum, https://github.com/golang/go/wiki/Modules#should-i-commit-my-gosum-file-as-well-as-my-gomod-file.

sonarcloud[bot] commented 3 years ago

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Nepomuceno commented 3 years ago

Thank you for your Contribution