Sha256: b50cc5f8c292f40e0ac2b3917a9e7f2ec9add88980b36305af389d944b1a9fad

Contents?: true

Size: 747 Bytes

Versions: 22

Compression:

Stored size: 747 Bytes

Contents

class TestSecurityGroup < TestYaoResource
  def test_rule_attributes
    params = {
      "id" => "test_rule_id_1",
      "security_group_ip" => "test_group_id_1",
      "direction"         => "ingress",
      "protocol"          => "tcp",
      "ethertype"         => "IPv4",
      "port_range_max"    => "443",
      "port_range_min"    => "443",
      "remote_ip_prefix"  => "10.0.0.0/24",
      "remote_group_id"   => nil,
      "tenant_id"         => "test_tenant"
    }

    rule = Yao::SecurityGroupRule.new(params)
    assert_equal("test_rule_id_1", rule.id)
    assert_equal("tcp", rule.protocol)
    assert_equal("443", rule.port_range_max)
    assert_equal("443", rule.port_range_min)
    assert_equal("IPv4", rule.ethertype)
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
yao-0.9.1 test/yao/resources/test_security_group_rule.rb
yao-0.9.0 test/yao/resources/test_security_group_rule.rb