-
Notifications
You must be signed in to change notification settings - Fork 118
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
Random String and Password Import #100
Conversation
Looks good. Do you need help testing this ? |
I have performed tests with basic as well as special characters based strings. But if you have some spare time to run through some cases that would be great. In terms of unit testing, I can add a test for |
Looks good. |
So far works pretty good:
|
@jahantech can you add import steps to the acceptance testing? Here is an example in AWS: https://github.com/terraform-providers/terraform-provider-aws/blob/98b8b848ca94031b20c3e626c9d40484e3af80de/aws/resource_aws_iot_topic_rule_test.go#L33-L37 |
@paultyng Thank you for providing the details. I have added the tests to my local branch, but they are not currently passing because my I will look into further to see how I can resolve this issue. Output for reference:
|
For an import, your code only runs through the import and read functions, the config file is not referenced, so you have a few options:
Hard for me to say which is the appropriate choice, I'd have to dig in to the functionality a little more, but wanted to give you some ideas. |
@paultyng I would have to ignore all the fields as they are set to 0. In such case I have |
I reworked some of the code and import testing in #104, there were some other minor issues with the repo so cleaned those up as well (vendoring). For import testing, you should explicitly ignore anything that is only user entered and not determined by the read. Its possible though that this would let people import strings that don't satisfy the create criteria, but I think that's an acceptable situation if they already have an existing password or something they want to use. |
I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR enables import functionality for random string. Resource state changes are used to determine if the string generation criterias were met.