diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2017-01-10 09:14:19 +0100 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2017-01-10 10:49:28 +0000 |
commit | 73c14a112bf24cc9ad5a73766058e0920d9aa7de (patch) | |
tree | 57b7a6753736f6123cc213c0884ce7c16e7d561a /acl/acl-impl/src/test/java | |
parent | 1075563ac279866b2aed210d4dac5504af2e2a56 (diff) |
HC2VPP-31: fix vpp-ace translation with no protocol set
Change-Id: I9d319ae3d04d90c7652828b0cb382ad142f9d2b6
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
(cherry picked from commit 1b7a019ae9ceeddee496b20f83c095ffcb87b6c2)
Diffstat (limited to 'acl/acl-impl/src/test/java')
-rw-r--r-- | acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/protocol/ProtoPreBindRuleProducerTest.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/protocol/ProtoPreBindRuleProducerTest.java b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/protocol/ProtoPreBindRuleProducerTest.java index 8f4100349..24de2c999 100644 --- a/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/protocol/ProtoPreBindRuleProducerTest.java +++ b/acl/acl-impl/src/test/java/io/fd/hc2vpp/acl/util/protocol/ProtoPreBindRuleProducerTest.java @@ -29,6 +29,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.vpp.acl. @RunWith(HoneycombTestRunner.class) public class ProtoPreBindRuleProducerTest implements ProtoPreBindRuleProducer, AclTestSchemaContext { + private static final byte IGNORE_PROTOCOL = 0; //TODO - remove after resolving how to address identity from different model in textual yang instance identifier private VppAce extractAce(AccessLists accessLists) { @@ -99,4 +100,11 @@ public class ProtoPreBindRuleProducerTest implements ProtoPreBindRuleProducer, A assertEquals(0, icmpRule.tcpFlagsValue); } + @Test + public void tesProtocolNotSpecified(@InjectTestData(resourcePath = "/rules/no-protocol-rule.json") AccessLists acls) { + final AclRule noProtocolRule = createPreBindRule(extractAce(acls)); + + assertEquals(IGNORE_PROTOCOL, noProtocolRule.proto); + } + }
\ No newline at end of file |