NoAction in ACL should be mapped to NOP
Change-Id: Ia3c9038eb726379ed2f95635c28ddf5794e646de
diff --git a/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/FabricInterpreterTest.java b/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/FabricInterpreterTest.java
index bb6b45d..11f22e7 100644
--- a/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/FabricInterpreterTest.java
+++ b/pipelines/fabric/src/test/java/org/onosproject/pipelines/fabric/FabricInterpreterTest.java
@@ -30,7 +30,6 @@
import org.onosproject.net.pi.runtime.PiActionParam;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
/**
* Test for fabric interpreter.
@@ -132,9 +131,20 @@
@Test
public void testEmptyForwardingTreatment() throws Exception {
TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
+
PiAction mappedAction = interpreter.mapTreatment(treatment,
FabricConstants.FABRIC_INGRESS_FORWARDING_UNICAST_V4);
- assertNull(mappedAction);
+ PiAction expectedAction = PiAction.builder()
+ .withId(FabricConstants.NOP)
+ .build();
+ assertEquals(expectedAction, mappedAction);
+
+ mappedAction = interpreter.mapTreatment(treatment,
+ FabricConstants.FABRIC_INGRESS_FORWARDING_ACL);
+ expectedAction = PiAction.builder()
+ .withId(FabricConstants.FABRIC_INGRESS_FORWARDING_NOP_ACL)
+ .build();
+ assertEquals(expectedAction, mappedAction);
}
/* Next control block */