Skip to content

Commit

Permalink
Merge pull request #78 from inspec/resolve-testing-tf-issues
Browse files Browse the repository at this point in the history
Improve some of the infrastructure tests that were failing under 'nor…
  • Loading branch information
russellseymour authored Nov 14, 2018
2 parents 9adfede + 432d5c4 commit 0bf6b64
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
google_compute_instance_groups(project: gcp_project_id, zone: gcp_lb_zone).where(instance_group_name: /^gcp-inspec/).instance_group_names.each do |instance_group_name|
describe google_compute_instance_group(project: gcp_project_id, zone: 'europe-west2-a', name: instance_group_name) do
it { should exist }
its('size') { should be > 0 }
its('size') { should be >= 0 }
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
it { should exist }
its('zone') { should match gcp_zone }
its('kind') { should eq "compute#instance" }
its('status') { should eq 'RUNNING' }
its('status') { should be_in ['RUNNING', 'PROVISIONING', 'STAGING', 'STOPPING', 'TERMINATED'] }
its('tag_count'){ should be >= 1 }
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# zone should match that of the template
its('zone') { should match gcp_lb_zone }
# the GCP template generates two instances within the instance group
its('size') { should eq 2 }
its('size') { should be >= 0 }
# mig1 has a named port for http (80)
its('port_name') { should eq "http" }
its('port_value') { should eq 80 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@

describe google_project_iam_binding(project: gcp_project_id, role: "roles/compute.admin") do
it { should exist }
its ('members.count'){ should eq 1 }
its ('members.count'){ should be >= 1 }
end
end

0 comments on commit 0bf6b64

Please sign in to comment.