Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix key vault import #124

Merged
merged 2 commits into from
Jun 23, 2017
Merged

Conversation

thiagocaiubi
Copy link
Contributor

Before

make testacc TEST=./azurerm TESTARGS="-run TestAccAzureRMKeyV"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run TestAccAzureRMKeyV -timeout 120m
=== RUN   TestAccAzureRMKeyVault_importBasic
--- FAIL: TestAccAzureRMKeyVault_importBasic (93.35s)
        testing.go:428: Step 1 error: ImportStateVerify attributes not
equivalent. Difference is shown below. Top is actual, bottom is
expected.

                (map[string]string) {
                }

                (map[string]string) (len=7) {
                 (string) (len=15) "access_policy.#": (string) (len=1) "1",
                 (string) (len=33) "access_policy.0.key_permissions.#": (string) (len=1) "1",
                 (string) (len=33) "access_policy.0.key_permissions.0": (string) (len=3) "all",
                 (string) (len=25) "access_policy.0.object_id": (string) (len=36) "0312e94a-ce28-4814-85b6-ec3b587cf2cc",
                 (string) (len=36) "access_policy.0.secret_permissions.#": (string) (len=1) "1",
                 (string) (len=36) "access_policy.0.secret_permissions.0": (string) (len=3) "all",
                 (string) (len=25) "access_policy.0.tenant_id": (string) (len=36) "2d5fc15a-26b1-49b6-a937-4379c05e8ef8"
                }

=== RUN   TestAccAzureRMKeyVault_basic
--- PASS: TestAccAzureRMKeyVault_basic (89.18s)
=== RUN   TestAccAzureRMKeyVault_update
--- PASS: TestAccAzureRMKeyVault_update (117.42s)
FAIL
exit status 1
FAIL github.com/terraform-providers/terraform-provider-azurerm/azurerm 300.066s
make: *** [testacc] Error 1

After:

make testacc TEST=./azurerm TESTARGS="-run TestAccAzureRMKeyV"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run TestAccAzureRMKeyV -timeout 120m
=== RUN   TestAccAzureRMKeyVault_importBasic
--- PASS: TestAccAzureRMKeyVault_importBasic (91.88s)
=== RUN   TestAccAzureRMKeyVault_basic
--- PASS: TestAccAzureRMKeyVault_basic (93.76s)
=== RUN   TestAccAzureRMKeyVault_update
--- PASS: TestAccAzureRMKeyVault_update (129.03s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 314.768s

Before

```
make testacc TEST=./azurerm TESTARGS="-run TestAccAzureRMKeyV"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run TestAccAzureRMKeyV -timeout 120m
=== RUN   TestAccAzureRMKeyVault_importBasic
--- FAIL: TestAccAzureRMKeyVault_importBasic (93.35s)
        testing.go:428: Step 1 error: ImportStateVerify attributes not
equivalent. Difference is shown below. Top is actual, bottom is
expected.

                (map[string]string) {
                }

                (map[string]string) (len=7) {
                 (string) (len=15) "access_policy.#": (string) (len=1) "1",
                 (string) (len=33) "access_policy.0.key_permissions.#": (string) (len=1) "1",
                 (string) (len=33) "access_policy.0.key_permissions.0": (string) (len=3) "all",
                 (string) (len=25) "access_policy.0.object_id": (string) (len=36) "0312e94a-ce28-4814-85b6-ec3b587cf2cc",
                 (string) (len=36) "access_policy.0.secret_permissions.#": (string) (len=1) "1",
                 (string) (len=36) "access_policy.0.secret_permissions.0": (string) (len=3) "all",
                 (string) (len=25) "access_policy.0.tenant_id": (string) (len=36) "2d5fc15a-26b1-49b6-a937-4379c05e8ef8"
                }

=== RUN   TestAccAzureRMKeyVault_basic
--- PASS: TestAccAzureRMKeyVault_basic (89.18s)
=== RUN   TestAccAzureRMKeyVault_update
--- PASS: TestAccAzureRMKeyVault_update (117.42s)
FAIL
exit status 1
FAIL github.com/terraform-providers/terraform-provider-azurerm/azurerm 300.066s
make: *** [testacc] Error 1
```

After:

```
make testacc TEST=./azurerm TESTARGS="-run TestAccAzureRMKeyV"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./azurerm -v -run TestAccAzureRMKeyV -timeout 120m
=== RUN   TestAccAzureRMKeyVault_importBasic
--- PASS: TestAccAzureRMKeyVault_importBasic (91.88s)
=== RUN   TestAccAzureRMKeyVault_basic
--- PASS: TestAccAzureRMKeyVault_basic (93.76s)
=== RUN   TestAccAzureRMKeyVault_update
--- PASS: TestAccAzureRMKeyVault_update (129.03s)
PASS
ok github.com/terraform-providers/terraform-provider-azurerm/azurerm 314.768s
```
Copy link
Contributor

@tombuildsstuff tombuildsstuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @thiagocaiubi

This PR LGTM - thanks a lot for this! The tests pass:

$ TF_ACC=1 envchain azurerm go test ./azurerm -v -run TestAccAzureRMKeyVault -timeout 300m -parallel 5
=== RUN   TestAccAzureRMKeyVault_importBasic
--- PASS: TestAccAzureRMKeyVault_importBasic (81.45s)
=== RUN   TestAccAzureRMKeyVault_basic
--- PASS: TestAccAzureRMKeyVault_basic (76.75s)
=== RUN   TestAccAzureRMKeyVault_update
--- PASS: TestAccAzureRMKeyVault_update (71.63s)
PASS
ok  	github.com/terraform-providers/terraform-provider-azurerm/azurerm	229.850s

Thanks!

@tombuildsstuff tombuildsstuff merged commit 5eeff52 into hashicorp:master Jun 23, 2017
tombuildsstuff added a commit that referenced this pull request Jun 23, 2017
tombuildsstuff added a commit that referenced this pull request Jul 4, 2017
tombuildsstuff added a commit that referenced this pull request Jul 4, 2017
@ghost
Copy link

ghost commented Apr 1, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants