Files
kata-containers/virtcontainers/macvtap_endpoint_test.go
Julio Montes f2423e7d7c virtcontainers: convert virtcontainers tests to testify/assert
Convert virtcontainers tests to testify/assert to make the virtcontainers
tests more readable.

fixes #156

Signed-off-by: Julio Montes <julio.montes@intel.com>
2019-07-19 15:28:45 +00:00

29 lines
521 B
Go

// Copyright (c) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package virtcontainers
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCreateMacvtapEndpoint(t *testing.T) {
netInfo := NetworkInfo{
Iface: NetlinkIface{
Type: "macvtap",
},
}
expected := &MacvtapEndpoint{
EndpointType: MacvtapEndpointType,
EndpointProperties: netInfo,
}
result, err := createMacvtapNetworkEndpoint(netInfo)
assert.NoError(t, err)
assert.Exactly(t, result, expected)
}