Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
netmon: Add unit testing
Browse files Browse the repository at this point in the history
This commit adds some unit testing in order to validate some of the
new code that have been introduced with the new network monitor.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
  • Loading branch information
Sebastien Boeuf committed Sep 14, 2018
1 parent f131590 commit 55af108
Show file tree
Hide file tree
Showing 2 changed files with 642 additions and 8 deletions.
18 changes: 10 additions & 8 deletions netmon/netmon.go
Expand Up @@ -69,21 +69,23 @@ const (

kataSuffix = "kata"

// For simplicity the code will only focus on IPv4 addresses for now.
netlinkFamily = netlink.FAMILY_V4

storageParentPath = "/var/run/kata-containers/netmon/sbs"
storageDirPerm = os.FileMode(0750)

// sharedFile is the name of the file that will be used to share
// the data between this process and the kata-runtime process
// responsible for updating the network.
sharedFile = "shared.json"
storageFilePerm = os.FileMode(0640)
storageDirPerm = os.FileMode(0750)
)

// version is the netmon version. This variable is populated at build time.
var version = "unknown"
var (
// version is the netmon version. This variable is populated at build time.
version = "unknown"

// For simplicity the code will only focus on IPv4 addresses for now.
netlinkFamily = netlink.FAMILY_V4

storageParentPath = "/var/run/kata-containers/netmon/sbs"
)

type netmonParams struct {
sandboxID string
Expand Down

0 comments on commit 55af108

Please sign in to comment.