Created
January 18, 2019 00:57
-
-
Save adrienthebo/c20ebae613a25e5499a9ab673df6a3ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
control 'project-bindings' do | |
projects.each do |project| | |
describe command("gcloud projects get-iam-policy #{project} --format='json(bindings)'") do | |
its('exit_status') { should eq 0 } | |
its('stderr') { should eq '' } | |
let(:members) do | |
bindings = JSON.parse(subject.stdout, symbolize_names: true)[:bindings] | |
bindings.find { |b| b[:'role'] == projectRoles[0] }[:members] | |
end | |
it { expect(members).to include(*memberGroups[0]) } | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment