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

resource/aws_directory_service_directory: Validate size argument and various code cleanup #3453

Merged
merged 2 commits into from
Feb 20, 2018

Conversation

bflad
Copy link
Contributor

@bflad bflad commented Feb 20, 2018

Noticed while working with the last PR.

=== RUN   TestAccAWSDirectoryServiceDirectory_tags
--- PASS: TestAccAWSDirectoryServiceDirectory_tags (460.33s)
=== RUN   TestAccAWSDirectoryServiceDirectory_basic
--- PASS: TestAccAWSDirectoryServiceDirectory_basic (461.76s)
=== RUN   TestAccAWSDirectoryServiceDirectory_withAliasAndSso
--- PASS: TestAccAWSDirectoryServiceDirectory_withAliasAndSso (551.92s)
=== RUN   TestAccAWSDirectoryServiceDirectory_importBasic
--- PASS: TestAccAWSDirectoryServiceDirectory_importBasic (565.95s)
=== RUN   TestAccAWSDirectoryServiceDirectory_connector
--- PASS: TestAccAWSDirectoryServiceDirectory_connector (861.86s)
=== RUN   TestAccAWSDirectoryServiceDirectory_microsoftStandard
--- PASS: TestAccAWSDirectoryServiceDirectory_microsoftStandard (1624.24s)
=== RUN   TestAccAWSDirectoryServiceDirectory_microsoft
--- PASS: TestAccAWSDirectoryServiceDirectory_microsoft (1648.19s)

@bflad bflad added service/directoryservice technical-debt Addresses areas of the codebase that need refactoring or redesign. labels Feb 20, 2018
@ghost ghost added the size/L Managed by automation to categorize the size of a PR. label Feb 20, 2018
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

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

LGTM, just two nitpicks.

}
if len(settings) > 1 {
return nil, fmt.Errorf("Only a single vpc_settings block is expected")
}
Copy link
Member

Choose a reason for hiding this comment

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

Nitpick: We could replace this with MaxItems: 1 in the schema, IMO.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated and testing now 👍

s := settings[0].(map[string]interface{})
if len(settings) > 1 {
return nil, fmt.Errorf("Only a single connect_settings block is expected")
}
Copy link
Member

Choose a reason for hiding this comment

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

Likewise - we can replace this with MaxItems: 1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated and testing now 👍

@bflad
Copy link
Contributor Author

bflad commented Feb 20, 2018

LGTM after switching to MaxItems: 1 as well! 🚀

@bflad bflad merged commit 25777a7 into master Feb 20, 2018
@bflad bflad deleted the td-aws_directory_service_directory-cleanup branch February 20, 2018 17:51
@bflad bflad added this to the v1.10.0 milestone Feb 20, 2018
bflad added a commit that referenced this pull request Feb 20, 2018
@ghost
Copy link

ghost commented Apr 7, 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. Thanks!

@ghost ghost locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/L Managed by automation to categorize the size of a PR. technical-debt Addresses areas of the codebase that need refactoring or redesign.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants