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

Improve google_project#to_s output #62

Merged
merged 1 commit into from
Oct 8, 2018
Merged

Improve google_project#to_s output #62

merged 1 commit into from
Oct 8, 2018

Conversation

adrienthebo
Copy link
Contributor

The google_project resource documentation indicates that resources are
instantiated with :project, but the google_project was storing the value
of :name for use with #to_s. This inconsistency leads to InSpec output
like the following:

 ✔  Project  should exist
 ✔  Project  name should eq "dev-host"
 ✔  Project  parent.type should eq "folder"
 ✔  Project  parent.id should eq "743996818495"

This commit adds :project as a fallback value for @display_name,
ensuring that google_projects will format correctly in the InSpec
report.

The google_project resource documentation indicates that resources are
instantiated with :project, but the google_project was storing the value
of :name for use with `#to_s`. This inconsistency leads to InSpec output
like the following:

     ✔  Project  should exist
     ✔  Project  name should eq "dev-host"
     ✔  Project  parent.type should eq "folder"
     ✔  Project  parent.id should eq "743996818495"

This commit adds :project as a fallback value for `@display_name,`
ensuring that google_projects will format correctly in the InSpec
report.

Signed-off-by: Adrien Thebo <[email protected]>
@skpaterson skpaterson self-requested a review October 8, 2018 10:52
Copy link

@skpaterson skpaterson left a comment

Choose a reason for hiding this comment

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

Many thanks for this improvement @adrienthebo !

@skpaterson skpaterson merged commit faf47ee into inspec:master Oct 8, 2018
skpaterson pushed a commit that referenced this pull request Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants