
- replaced s.GetContainerByName("xyz") with s.Containers.Xyz in tests and suites - same thing for interfaces - each suite has its own structs with containers/interfaces - structs are initialized in SetupSuite Type: test Change-Id: I5bd99605b40921b7b8c844e8650f6fb0915e9e99 Signed-off-by: Adrian Villin <avillin@cisco.com>
31 lines
579 B
Go
31 lines
579 B
Go
package main
|
|
|
|
import (
|
|
. "fd.io/hs-test/infra"
|
|
)
|
|
|
|
func init() {
|
|
RegisterCpuPinningSoloTests(DefaultCpuConfigurationTest, SkipCoresTest)
|
|
}
|
|
|
|
// TODO: Add more CPU configuration tests
|
|
|
|
func DefaultCpuConfigurationTest(s *CpuPinningSuite) {
|
|
vpp := s.Containers.Vpp.VppInstance
|
|
s.AssertNil(vpp.Start())
|
|
}
|
|
|
|
func SkipCoresTest(s *CpuPinningSuite) {
|
|
|
|
skipCoresConfiguration := VppCpuConfig{
|
|
PinMainCpu: true,
|
|
PinWorkersCorelist: true,
|
|
SkipCores: 1,
|
|
}
|
|
|
|
vpp := s.Containers.Vpp.VppInstance
|
|
vpp.CpuConfig = skipCoresConfiguration
|
|
|
|
s.AssertNil(vpp.Start())
|
|
}
|