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 ability to test individual as well as multiple organisations #110

Merged

Conversation

walterdolce
Copy link
Contributor

I wasn't really sure how I should have gone about testing this as you need to have a G Suite account for this (and I did not want to use the company one), but I promise everything works. I have a screenshot for it! 😛

screenshot_2019-02-20_at_17_15_10

@walterdolce walterdolce force-pushed the feature/add-google-organisations-resource branch from dd0be11 to eae3ad3 Compare February 20, 2019 17:18
@walterdolce walterdolce force-pushed the feature/add-google-organisations-resource branch from eae3ad3 to b639110 Compare February 20, 2019 17:19
Signed-Off-By: Walter Dolce <[email protected]>
@walterdolce
Copy link
Contributor Author

The above is based on:

  describe google_organizations do
    it { should exist }
  end

  google_organizations.where(display_name: 'myorg.com').names.each do |name|
    describe google_organization(name: name) do
      it { should exist }
      its('lifecycle_state') { should eq 'ACTIVE' }
    end
  end

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.

Thanks for this @walterdolce, looks great! How about we add the controls for this resource but make them disabled by default with a flag? You could use the below control as an example of doing that:
https://github.com/inspec/inspec-gcp/blob/master/test/integration/verify/controls/google_kms_crypto_key.rb

@walterdolce walterdolce force-pushed the feature/add-google-organisations-resource branch from b5bb1e8 to c36114f Compare February 21, 2019 12:00
@walterdolce
Copy link
Contributor Author

@skpaterson sounds good. Done!

@skpaterson
Copy link

Brilliant, thanks again. For completeness do you mind adding the control for the singular google_organization resource and we're good to go?

@walterdolce
Copy link
Contributor Author

@skpaterson certainly. Also done!

@skpaterson skpaterson merged commit 4ea6ca2 into inspec:master Feb 21, 2019
skpaterson pushed a commit that referenced this pull request Mar 1, 2019
Templates, inspec.yaml for bigquery table
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