Sha256: dd00ced3978e35505f07189cce17454c96da1b0e3019cd8ce48932e722513707

Contents?: true

Size: 786 Bytes

Versions: 21

Compression:

Stored size: 786 Bytes

Contents

class TestSecurityGroup < Test::Unit::TestCase
  def test_sg_attributes
    params = {
      "id"                   => "test_group_id_1",
      "name"                 => "test_group_name_1",
      "description"          => "test_description_1",
      "security_group_rules" => [
        {
          "id"        => "test_rule_id_1",
          "direction" => "ingress",
          "protocol"  => "tcp",
          "ethertype" => "IPv4",
          "port"      =>  "443",
          "remote_ip" => "10.0.0.0/24"
        }
      ]
    }

    sg = Yao::SecurityGroup.new(params)
    assert_equal(sg.name, "test_group_name_1")
    assert_equal(sg.id, "test_group_id_1")
    assert_equal(sg.description, "test_description_1")
    assert(sg.rules[0].instance_of?(Yao::SecurityGroupRule))
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
yao-0.7.0 test/yao/resources/test_security_group.rb
yao-0.6.3 test/yao/resources/test_security_group.rb
yao-0.6.2 test/yao/resources/test_security_group.rb
yao-0.6.1 test/yao/resources/test_security_group.rb
yao-0.6.0 test/yao/resources/test_security_group.rb
yao-0.5.0 test/yao/resources/test_security_group.rb
yao-0.4.3 test/yao/resources/test_security_group.rb
yao-0.4.2 test/yao/resources/test_security_group.rb
yao-0.4.1 test/yao/resources/test_security_group.rb
yao-0.4.0 test/yao/resources/test_security_group.rb
yao-0.3.8 test/yao/resources/test_security_group.rb
yao-0.3.7 test/yao/resources/test_security_group.rb
yao-0.3.6 test/yao/resources/test_security_group.rb
yao-0.3.5 test/yao/resources/test_security_group.rb
yao-0.3.4 test/yao/resources/test_security_group.rb
yao-0.3.3 test/yao/resources/test_security_group.rb
yao-0.3.2 test/yao/resources/test_security_group.rb
yao-0.3.1 test/yao/resources/test_security_group.rb
yao-0.3.0 test/yao/resources/test_security_group.rb
yao-0.2.13 test/yao/resources/test_security_group.rb