Skip to content

Commit

Permalink
Update VERSION to v0.15.1 (#63)
Browse files Browse the repository at this point in the history
Also fixed an uncommon unit test package name.

Signed-off-by: Quan Tian <[email protected]>
  • Loading branch information
tnqn authored Nov 1, 2024
1 parent 6ea2df2 commit 009740f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.15.0
v0.15.1
14 changes: 6 additions & 8 deletions openflow15/match_test.go
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
package openflow15_test
package openflow15

import (
"bytes"
"fmt"
"net"
"testing"

"antrea.io/libOpenflow/openflow15"
)

func TestMatchEthAddresses(t *testing.T) {
ethSrcAddress, _ := net.ParseMAC("aa:aa:aa:aa:aa:aa")
ethDstAddress, _ := net.ParseMAC("ff:ff:ff:ff:ff:ff")

ofMatch := openflow15.NewMatch()
ofMatch := NewMatch()
{
macSrcField := openflow15.NewEthSrcField(ethSrcAddress, nil)
macSrcField := NewEthSrcField(ethSrcAddress, nil)
ofMatch.AddField(*macSrcField)

macDstField := openflow15.NewEthDstField(ethDstAddress, nil)
macDstField := NewEthDstField(ethDstAddress, nil)
ofMatch.AddField(*macDstField)
}

Expand All @@ -27,15 +25,15 @@ func TestMatchEthAddresses(t *testing.T) {
}
}

func checkMatchSerializationConsistency(ofMatch *openflow15.Match) error {
func checkMatchSerializationConsistency(ofMatch *Match) error {
// Serialize the original match
ofMatchRaw, err := ofMatch.MarshalBinary()
if err != nil {
return fmt.Errorf("failed to marshal match: %w", err)
}

// Deserialize into a new match object
ofMatchRecovered := openflow15.NewMatch()
ofMatchRecovered := NewMatch()
if err := ofMatchRecovered.UnmarshalBinary(ofMatchRaw); err != nil {
return fmt.Errorf("failed to unmarshal match: %w", err)
}
Expand Down

0 comments on commit 009740f

Please sign in to comment.