quality: Add test cases for flow_mod message
This commit is contained in:
parent
c2f731d38a
commit
42dd435b63
2 changed files with 88 additions and 30 deletions
|
|
@ -14,7 +14,16 @@ defmodule OfpFlowModTest do
|
|||
describe "Openflow.read/1" do
|
||||
test "with OFP_FLOW_MOD packet(1)" do
|
||||
binary = File.read!(@flow_mod1)
|
||||
{:ok, fm, ""} = Openflow.read(binary)
|
||||
|
||||
fm =
|
||||
binary
|
||||
|> Openflow.read()
|
||||
|> elem(1)
|
||||
|> Map.to_list()
|
||||
|> Openflow.FlowMod.new()
|
||||
|> Openflow.to_binary()
|
||||
|> Openflow.read()
|
||||
|> elem(1)
|
||||
|
||||
assert fm.cookie == 0
|
||||
assert fm.cookie_mask == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue