hashicorp / vault-plugin-secrets-azure

Vault Azure Secrets plugin
Mozilla Public License 2.0
26 stars 19 forks source link

Removes mock from rotate root tests and fixes terraform permissions #158

Closed austingebauer closed 1 year ago

austingebauer commented 1 year ago

This PR removes the mocked client from the rotate root tests to give better confidence that future changes don't break anything. This is motivated by a request to find minimally scoped permissions to assign the principal given to Vault. The prior recommendation ended up not working for the rotate root API. I didn't realize these tests were mocked because the exact same tests in Azure auth are not mocked.

All tests are passing with this update:

$ make testacc  
==> Checking that code complies with gofmt requirements...
go generate 
VAULT_ACC=1 go test -tags='vault-plugin-secrets-azure' $(go list ./... | grep -v /vendor/)  -timeout 45m
?       github.com/hashicorp/vault-plugin-secrets-azure/api     [no test files]
?       github.com/hashicorp/vault-plugin-secrets-azure/cmd/vault-plugin-secrets-azure  [no test files]
ok      github.com/hashicorp/vault-plugin-secrets-azure 81.315s