1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/hp/models/compute/security_group_tests.rb
Paul Thornthwaite 190d86dba6 Disables tests with race conditions affecting CI
GH#1546 - The new build system on Travis CI is erring amongst three
tests. Initial investigating hints that they contain race conditions
in the tests (rather than the code).

We've decided to disable the tests whilst we look to resolve since it is
devaluing the CI for the rest of the project.
2013-02-05 11:19:02 +00:00

38 lines
1.3 KiB
Ruby

Shindo.tests("Fog::Compute[:hp] | security_group", ['hp']) do
# Disabled due to https://github.com/fog/fog/1546
pending
model_tests(Fog::Compute[:hp].security_groups, {:name => 'foggroupname', :description => 'foggroupdescription'}, true)
tests("a group with trailing whitespace") do
@group = Fog::Compute[:hp].security_groups.create(:name => " foggroup with spaces ", :description => " fog group desc ")
test("all spaces are removed from name") do
@group.name == " foggroup with spaces ".strip!
end
test("all spaces are removed from description") do
@group.description == " fog group desc ".strip!
end
@other_group = Fog::Compute[:hp].security_groups.create(:name => 'other group', :description => 'another group')
test("authorize access by another security group") do
sgrule = @group.create_rule(80..80, "tcp", nil, @other_group.id)
@sg_rule_id = sgrule.body['security_group_rule']['id']
@group.reload
s = @group.rules.select {|r| r['id'] == @sg_rule_id unless r.nil?}
s[0]['id'] == @sg_rule_id
end
test("revoke access from another security group") do
@group.delete_rule(@sg_rule_id)
@group.reload
s = @group.rules.select {|r| r['id'] == @sg_rule_id unless r.nil?}
s.empty?
end
@other_group.destroy
@group.destroy
end
end