e7625d0856
Exported indentifiers in Go start with capital letters. Only few fields in hs-test, which are being unmarshaled from yaml are required to be exported. Every other field name or method name should start with lower-case letter, to be consistent with this naming convention. Type: test Signed-off-by: Maros Ondrejicka <mondreji@cisco.com> Change-Id: I7eab0eef9fd08a7890c77b6ce1aeb3fa4b80f3cd
47 lines
1000 B
Go
47 lines
1000 B
Go
package main
|
|
|
|
const (
|
|
// These correspond to names used in yaml config
|
|
clientInterface = "hst_client_vpp"
|
|
serverInterface = "hst_server_vpp"
|
|
)
|
|
|
|
type NsSuite struct {
|
|
HstSuite
|
|
}
|
|
|
|
func (s *NsSuite) SetupSuite() {
|
|
s.configureNetworkTopology("ns")
|
|
|
|
s.loadContainerTopology("ns")
|
|
}
|
|
|
|
func (s *NsSuite) SetupTest() {
|
|
s.skipIfUnconfiguring()
|
|
s.setupVolumes()
|
|
s.setupContainers()
|
|
|
|
// Setup test conditions
|
|
var startupConfig Stanza
|
|
startupConfig.
|
|
newStanza("session").
|
|
append("enable").
|
|
append("use-app-socket-api").
|
|
append("evt_qs_memfd_seg").
|
|
append("event-queue-length 100000").close()
|
|
|
|
container := s.getContainerByName("vpp")
|
|
vpp, _ := container.newVppInstance(startupConfig)
|
|
vpp.start()
|
|
|
|
idx, err := vpp.createAfPacket(s.netInterfaces[serverInterface])
|
|
s.assertNil(err)
|
|
s.assertNotEqual(0, idx)
|
|
|
|
idx, err = vpp.createAfPacket(s.netInterfaces[clientInterface])
|
|
s.assertNil(err)
|
|
s.assertNotEqual(0, idx)
|
|
|
|
container.exec("chmod 777 -R %s", container.getContainerWorkDir())
|
|
}
|