github.com/juju/juju@v0.0.0-20240327075706-a90865de2538/container/kvm/container_internal_test.go (about) 1 // Copyright 2017 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package kvm 5 6 import ( 7 "github.com/juju/testing" 8 gc "gopkg.in/check.v1" 9 10 corenetwork "github.com/juju/juju/core/network" 11 ) 12 13 type containerInternalSuite struct { 14 testing.IsolationSuite 15 } 16 17 var _ = gc.Suite(&containerInternalSuite{}) 18 19 func (containerInternalSuite) TestInterfaceInfo(c *gc.C) { 20 i := interfaceInfo{config: corenetwork.InterfaceInfo{ 21 MACAddress: "mac", ParentInterfaceName: "piname", InterfaceName: "iname"}} 22 c.Check(i.InterfaceName(), gc.Equals, "iname") 23 c.Check(i.ParentInterfaceName(), gc.Equals, "piname") 24 c.Assert(i.MACAddress(), gc.Equals, "mac") 25 }