summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/ldp_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/ldp_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/ldp_test.go')
-rw-r--r--extras/hs-test/ldp_test.go46
1 files changed, 23 insertions, 23 deletions
diff --git a/extras/hs-test/ldp_test.go b/extras/hs-test/ldp_test.go
index 59d31e13890..c2d6f33b714 100644
--- a/extras/hs-test/ldp_test.go
+++ b/extras/hs-test/ldp_test.go
@@ -9,10 +9,10 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() {
var clnVclConf, srvVclConf Stanza
serverContainer := s.getContainerByName("server-vpp")
- serverVclFileName := serverContainer.GetHostWorkDir() + "/vcl_srv.conf"
+ serverVclFileName := serverContainer.getHostWorkDir() + "/vcl_srv.conf"
clientContainer := s.getContainerByName("client-vpp")
- clientVclFileName := clientContainer.GetHostWorkDir() + "/vcl_cln.conf"
+ clientVclFileName := clientContainer.getHostWorkDir() + "/vcl_cln.conf"
ldpreload := os.Getenv("HST_LDPRELOAD")
s.assertNotEqual("", ldpreload)
@@ -26,35 +26,35 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() {
s.log("starting VPPs")
clientAppSocketApi := fmt.Sprintf("app-socket-api %s/var/run/app_ns_sockets/2",
- clientContainer.GetContainerWorkDir())
+ clientContainer.getContainerWorkDir())
err := clnVclConf.
- NewStanza("vcl").
- Append("rx-fifo-size 4000000").
- Append("tx-fifo-size 4000000").
- Append("app-scope-local").
- Append("app-scope-global").
- Append("use-mq-eventfd").
- Append(clientAppSocketApi).Close().
- SaveToFile(clientVclFileName)
+ newStanza("vcl").
+ append("rx-fifo-size 4000000").
+ append("tx-fifo-size 4000000").
+ append("app-scope-local").
+ append("app-scope-global").
+ append("use-mq-eventfd").
+ append(clientAppSocketApi).close().
+ saveToFile(clientVclFileName)
s.assertNil(err)
serverAppSocketApi := fmt.Sprintf("app-socket-api %s/var/run/app_ns_sockets/1",
- serverContainer.GetContainerWorkDir())
+ serverContainer.getContainerWorkDir())
err = srvVclConf.
- NewStanza("vcl").
- Append("rx-fifo-size 4000000").
- Append("tx-fifo-size 4000000").
- Append("app-scope-local").
- Append("app-scope-global").
- Append("use-mq-eventfd").
- Append(serverAppSocketApi).Close().
- SaveToFile(serverVclFileName)
+ newStanza("vcl").
+ append("rx-fifo-size 4000000").
+ append("tx-fifo-size 4000000").
+ append("app-scope-local").
+ append("app-scope-global").
+ append("use-mq-eventfd").
+ append(serverAppSocketApi).close().
+ saveToFile(serverVclFileName)
s.assertNil(err)
s.log("attaching server to vpp")
srvEnv := append(os.Environ(), ldpreload, "VCL_CONFIG="+serverVclFileName)
- go StartServerApp(srvCh, stopServerCh, srvEnv)
+ go startServerApp(srvCh, stopServerCh, srvEnv)
err = <-srvCh
s.assertNil(err)
@@ -62,8 +62,8 @@ func (s *VethsSuite) TestLDPreloadIperfVpp() {
s.log("attaching client to vpp")
var clnRes = make(chan string, 1)
clnEnv := append(os.Environ(), ldpreload, "VCL_CONFIG="+clientVclFileName)
- serverVethAddress := s.netInterfaces[serverInterfaceName].IP4AddressString()
- go StartClientApp(serverVethAddress, clnEnv, clnCh, clnRes)
+ serverVethAddress := s.netInterfaces[serverInterfaceName].ip4AddressString()
+ go startClientApp(serverVethAddress, clnEnv, clnCh, clnRes)
s.log(<-clnRes)
// wait for client's result