summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/vcl_test.go
diff options
context:
space:
mode:
authorMaros Ondrejicka <mondreji@cisco.com>2023-02-28 16:55:01 +0100
committerFlorin Coras <florin.coras@gmail.com>2023-03-15 17:20:57 +0000
commite7625d08566f6127acb351376797b4fdc75e3c6a (patch)
treecbe07626c5211af5ed3f55ab360b259e82d03c8c /extras/hs-test/vcl_test.go
parentc3542e17b5dfea27f46f0656e8f1f8092545b796 (diff)
hs-test: use consistent naming convention
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
Diffstat (limited to 'extras/hs-test/vcl_test.go')
-rw-r--r--extras/hs-test/vcl_test.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/extras/hs-test/vcl_test.go b/extras/hs-test/vcl_test.go
index 7cf4ab75dfd..fe55af1866a 100644
--- a/extras/hs-test/vcl_test.go
+++ b/extras/hs-test/vcl_test.go
@@ -20,12 +20,12 @@ func (s *VethsSuite) TestVclEchoTcp() {
}
func (s *VethsSuite) testVclEcho(proto string) {
- serverVethAddress := s.netInterfaces["vppsrv"].IP4AddressString()
+ serverVethAddress := s.netInterfaces["vppsrv"].ip4AddressString()
uri := proto + "://" + serverVethAddress + "/12344"
echoSrvContainer := s.getContainerByName("server-application")
serverCommand := "vpp_echo server TX=RX" +
- " socket-name " + echoSrvContainer.GetContainerWorkDir() + "/var/run/app_ns_sockets/1" +
+ " socket-name " + echoSrvContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/1" +
" use-app-socket-api" +
" uri " + uri
s.log(serverCommand)
@@ -34,7 +34,7 @@ func (s *VethsSuite) testVclEcho(proto string) {
echoClnContainer := s.getContainerByName("client-application")
clientCommand := "vpp_echo client" +
- " socket-name " + echoClnContainer.GetContainerWorkDir() + "/var/run/app_ns_sockets/2" +
+ " socket-name " + echoClnContainer.getContainerWorkDir() + "/var/run/app_ns_sockets/2" +
" use-app-socket-api uri " + uri
s.log(clientCommand)
o := echoClnContainer.exec(clientCommand)
@@ -52,7 +52,7 @@ func (s *VethsSuite) testRetryAttach(proto string) {
echoSrvContainer := s.getContainerByName("server-application")
- serverVclConfContent := fmt.Sprintf(vclTemplate, echoSrvContainer.GetContainerWorkDir(), "1")
+ serverVclConfContent := fmt.Sprintf(vclTemplate, echoSrvContainer.getContainerWorkDir(), "1")
echoSrvContainer.createFile("/vcl.conf", serverVclConfContent)
echoSrvContainer.addEnvVar("VCL_CONFIG", "/vcl.conf")
@@ -62,10 +62,10 @@ func (s *VethsSuite) testRetryAttach(proto string) {
s.log("... Running first echo client test, before disconnect.")
serverVeth := s.netInterfaces[serverInterfaceName]
- serverVethAddress := serverVeth.IP4AddressString()
+ serverVethAddress := serverVeth.ip4AddressString()
echoClnContainer := s.getTransientContainerByName("client-application")
- clientVclConfContent := fmt.Sprintf(vclTemplate, echoClnContainer.GetContainerWorkDir(), "2")
+ clientVclConfContent := fmt.Sprintf(vclTemplate, echoClnContainer.getContainerWorkDir(), "2")
echoClnContainer.createFile("/vcl.conf", clientVclConfContent)
testClientCommand := "vcl_test_client -U -p " + proto + " " + serverVethAddress + " 12346"
@@ -95,13 +95,13 @@ func (s *VethsSuite) TestTcpWithLoss() {
serverVeth := s.netInterfaces[serverInterfaceName]
serverVpp.vppctl("test echo server uri tcp://%s/20022",
- serverVeth.IP4AddressString())
+ serverVeth.ip4AddressString())
clientVpp := s.getContainerByName("client-vpp").vppInstance
// Ensure that VPP doesn't abort itself with NSIM enabled
// Warning: Removing this ping will make the test fail!
- clientVpp.vppctl("ping %s", serverVeth.IP4AddressString())
+ clientVpp.vppctl("ping %s", serverVeth.ip4AddressString())
// Add loss of packets with Network Delay Simulator
clientVpp.vppctl("set nsim poll-main-thread delay 0.01 ms bandwidth 40 gbit" +
@@ -111,7 +111,7 @@ func (s *VethsSuite) TestTcpWithLoss() {
// Do echo test from client-vpp container
output := clientVpp.vppctl("test echo client uri tcp://%s/20022 mbytes 50",
- serverVeth.IP4AddressString())
+ serverVeth.ip4AddressString())
s.assertEqual(true, len(output) != 0)
s.assertNotContains(output, "failed: timeout")
s.log(output)