diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2018-08-13 12:17:29 +0200 |
---|---|---|
committer | Marek Gradzki <mgradzki@cisco.com> | 2018-08-13 12:17:47 +0200 |
commit | 0a9c0f91cccc371c802a47ac25443f3c7837f939 (patch) | |
tree | e0e52479e01b714664f3dbfa1a931b7ff977cd4f /vpp-classifier/impl/src/test/java | |
parent | 99dcb6c4d23eda602adb54a3702ad941071ba451 (diff) |
Explicitly fail when classify table for given session is missing
Change-Id: Ied737af2eb650f54fbaa5413eb0a586793d34e43
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-classifier/impl/src/test/java')
-rw-r--r-- | vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java index b59acdb4e..ccb02708e 100644 --- a/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java +++ b/vpp-classifier/impl/src/test/java/io/fd/hc2vpp/vpp/classifier/write/ClassifySessionWriterTest.java @@ -181,4 +181,13 @@ public class ClassifySessionWriterTest extends WriterCustomizerTest { customizer.deleteCurrentAttributes(id, classifySession, writeContext); } + + @Test(expected = IllegalStateException.class) + public void testDeleteMisssingTable() throws WriteFailedException { + when(writeContext.readAfter(ArgumentMatchers.any())).thenReturn(Optional.absent()); + final String match = "00:00:00:00:00:00:01:02:03:04:05:06:00:00:00:00"; + final ClassifySession classifySession = generateClassifySession(SESSION_INDEX, match); + final InstanceIdentifier<ClassifySession> id = getClassifySessionId(TABLE_NAME, match); + customizer.writeCurrentAttributes(id, classifySession, writeContext); + } }
\ No newline at end of file |