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

Add acceptance tests for the password policy framework implementation #2113

Merged

Conversation

fairclothjm
Copy link
Contributor

@fairclothjm fairclothjm commented Dec 14, 2023

Description

This PR

  • adds acceptance tests for the password policy framework implementation
  • removes the sdkV2 password policy resource
  • adds an id field to the base schema because
    • the id attribute was implicitly added in the sdkV2 so we must explicitly add it for existing resources, otherwise its a breaking change for practitioners and
    • it is required for acceptance testing with the sdkV2 package
  • writes the id field to state for the Create/Update/Delete operations which is required for backwards compat and acceptance testing

Additionally, we add a placeholder directory structure for new resources and datasources implemented with the TF Plugin Framework:

internal/vault
├── auth
│   └── README.md
├── secrets
│   └── README.md
└── sys
    ├── README.md
    ├── password_policy.go
    └── password_policy_test.go

@fairclothjm fairclothjm requested a review from a team December 18, 2023 20:00
Copy link
Contributor

@austingebauer austingebauer left a comment

Choose a reason for hiding this comment

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

LGTM. I like the start of the directory structure for organization.

Comment on lines +17 to +20
// Ideally this struct would be imbedded into all Resources and DataSources.
// However, the Terraform Plugin Framework doesn't support unmarshalling nested
// structs. See https://github.com/hashicorp/terraform-plugin-framework/issues/242
// So for now, we must duplicate all fields.
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the context here.

@@ -1,52 +0,0 @@
// Copyright (c) HashiCorp, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you can also delete vault/password_policy.go?

@github-actions github-actions bot added size/XL and removed size/L labels Dec 18, 2023
@fairclothjm fairclothjm merged commit a369650 into VAULT-20749/mux-provider Dec 19, 2023
11 checks passed
@fairclothjm fairclothjm deleted the VAULT-20750/password-policy-acc-tests branch December 19, 2023 16:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants