Sha256: 4448a573c995e8c18d190b8afd166953baa8821084bff1f06130dee2a648613f

Contents?: true

Size: 747 Bytes

Versions: 1

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(rule.id, "test_rule_id_1")
    assert_equal(rule.protocol, "tcp")
    assert_equal(rule.port_range_max, "443")
    assert_equal(rule.port_range_min, "443")
    assert_equal(rule.ethertype, "IPv4")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yao-0.8.0 test/yao/resources/test_security_group_rule.rb