Debian Codegraph @

integration/integration_linux_test.go

raw symbols SCIP
1 // Copyright 2018 CNI authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 package integration_testscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/
15
16 import (
17 "bytesscip-go gomod github.com/golang/go/src go1.24.2 bytes/"
18 "fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/"
19 "ioscip-go gomod github.com/golang/go/src go1.24.2 io/"
20 "logscip-go gomod github.com/golang/go/src go1.24.2 log/"
21 "math/randscip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/"
22 "netscip-go gomod github.com/golang/go/src go1.24.2 net/"
23 "osscip-go gomod github.com/golang/go/src go1.24.2 os/"
24 "os/execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/"
25 "path/filepathscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/"
26 "regexpscip-go gomod github.com/golang/go/src go1.24.2 regexp/"
27 "strconvscip-go gomod github.com/golang/go/src go1.24.2 strconv/"
28 "stringsscip-go gomod github.com/golang/go/src go1.24.2 strings/"
29 "timescip-go gomod github.com/golang/go/src go1.24.2 time/"
30
31 . "github.com/onsi/ginkgo/v2scip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/"
32 . "github.com/onsi/gomegascip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/"
33 "github.com/onsi/gomega/gbytesscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gbytes`/"
34 "github.com/onsi/gomega/gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/"
35 )
36
37 var _ = Describescip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/Describe().("Basic PTP using cnitool", func() {
38 var (
39 cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin. string
40 cniPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cniPath. string
41 )
42
43 BeforeEachscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/BeforeEach().(func() {
44 var errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. error
45 cniPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cniPath., errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. = filepathscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/.Absscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/Abs().("../bin")
46 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err.).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
47 cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. = execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/.LookPathscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/LookPath().("cnitool")
48 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err.).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().(), "expected to find cnitool in your PATH")
49 })
50
51 Contextscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/Context.("basic cases", func() {
52 var (
53 envscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:env. TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#
54 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS. Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#
55 contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS. Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#
56 )
57
58 BeforeEachscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/BeforeEach().(func() {
59 var errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. error
60
61 netConfPath, errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. := filepathscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/.Absscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/Abs().("./testdata")
62 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err.).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
63
64 // Flush ipam stores to avoid conflicts
65 errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. = osscip-go gomod github.com/golang/go/src go1.24.2 os/.RemoveAllscip-go gomod github.com/golang/go/src go1.24.2 os/RemoveAll().("/tmp/chained-ptp-bandwidth-test")
66 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err.).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
67
68 errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err. = osscip-go gomod github.com/golang/go/src go1.24.2 os/.RemoveAllscip-go gomod github.com/golang/go/src go1.24.2 os/RemoveAll().("/tmp/basic-ptp-test")
69 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(errscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:err.).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
70
71 envscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:env. = TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#([]string{
72 "CNI_PATH=" + cniPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cniPath.,
73 "NETCONFPATH=" + netConfPath,
74 "PATH=" + osscip-go gomod github.com/golang/go/src go1.24.2 os/.Getenvscip-go gomod github.com/golang/go/src go1.24.2 os/Getenv().("PATH"),
75 })
76
77 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS. = Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("cni-test-host-%x", randscip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/.Int31scip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/Int31().()))
78 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS..Addscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Add().()
79
80 contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS. = Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("cni-test-cont-%x", randscip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/.Int31scip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/Int31().()))
81 contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS..Addscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Add().()
82 })
83
84 AfterEachscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/AfterEach().(func() {
85 contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS..Delscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Del().()
86 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS..Delscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Del().()
87 })
88
89 basicAssertion := func(netNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:netName., expectedIPPrefixscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:expectedIPPrefix. string) {
90 envscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:env..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS., cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., "add", netNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:netName., contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS..LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().())
91
92 addrOutput := envscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:env..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS., "ip", "addr")
93
94 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(addrOutput).Toscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#To().(ContainSubstringscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/ContainSubstring().(expectedIPPrefixscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:expectedIPPrefix.))
95
96 envscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:env..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS., cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., "del", netNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:netName., contNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS..LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().())
97 }
98
99 Itscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/It().("supports basic network add and del operations", func() {
100 basicAssertion("basic-ptp", "10.1.2.")
101 })
102
103 Itscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/It().("supports add and del with ptp + bandwidth", func() {
104 basicAssertion("chained-ptp-bandwidth", "10.9.2.")
105 })
106 })
107
108 Contextscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/Context.("when the bandwidth plugin is chained with a plugin that returns multiple adapters", func() {
109 var (
110 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS. Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#
111 contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1. Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#
112 contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2. Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#
113 basicBridgeEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeEnv. TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#
114 chainedBridgeBandwidthEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthEnv. TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#
115 chainedBridgeBandwidthSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthSession., basicBridgeSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeSession. *gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/.Sessionscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#
116 )
117
118 BeforeEachscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/BeforeEach().(func() {
119 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS. = Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("cni-test-host-%x", randscip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/.Int31scip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/Int31().()))
120 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS..Addscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Add().()
121
122 contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1. = Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("cni-test-cont1-%x", randscip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/.Int31scip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/Int31().()))
123 contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1..Addscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Add().()
124
125 contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2. = Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("cni-test-cont2-%x", randscip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/.Int31scip-go gomod github.com/golang/go/src go1.24.2 `math/rand`/Int31().()))
126 contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2..Addscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Add().()
127
128 basicBridgeNetConfPath, err := filepathscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/.Absscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/Abs().("./testdata/basic-bridge")
129 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
130
131 basicBridgeEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeEnv. = TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#([]string{
132 "CNI_PATH=" + cniPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cniPath.,
133 "NETCONFPATH=" + basicBridgeNetConfPath,
134 "PATH=" + osscip-go gomod github.com/golang/go/src go1.24.2 os/.Getenvscip-go gomod github.com/golang/go/src go1.24.2 os/Getenv().("PATH"),
135 })
136
137 chainedBridgeBandwidthNetConfPath, err := filepathscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/.Absscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/Abs().("./testdata/chained-bridge-bandwidth")
138 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
139
140 chainedBridgeBandwidthEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthEnv. = TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#([]string{
141 "CNI_PATH=" + cniPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cniPath.,
142 "NETCONFPATH=" + chainedBridgeBandwidthNetConfPath,
143 "PATH=" + osscip-go gomod github.com/golang/go/src go1.24.2 os/.Getenvscip-go gomod github.com/golang/go/src go1.24.2 os/Getenv().("PATH"),
144 })
145 })
146
147 AfterEachscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/AfterEach().(func() {
148 if chainedBridgeBandwidthSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthSession. != nil {
149 chainedBridgeBandwidthSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthSession..Killscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Kill().()
150 }
151 if basicBridgeSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeSession. != nil {
152 basicBridgeSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeSession..Killscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Kill().()
153 }
154
155 chainedBridgeBandwidthEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthEnv..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS., cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., "del", "network-chain-test", contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1..LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().())
156 basicBridgeEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeEnv..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS., cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., "del", "network-chain-test", contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2..LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().())
157
158 contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1..Delscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Del().()
159 contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2..Delscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Del().()
160 hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS..Delscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Del().()
161 })
162
163 Itscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/It().("limits traffic only on the restricted bandwidth veth device", func() {
164 ipRegexp := regexpscip-go gomod github.com/golang/go/src go1.24.2 regexp/.MustCompilescip-go gomod github.com/golang/go/src go1.24.2 regexp/MustCompile().(`10\.1[12]\.2\.\d{1,3}`)
165
166 Byscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/By().(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("adding %s to %s\n\n", "chained-bridge-bandwidth", contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1..ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().()))
167 chainedBridgeBandwidthEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthEnv..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS., cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., "add", "network-chain-test", contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1..LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().())
168 chainedBridgeIP := ipRegexp.FindStringscip-go gomod github.com/golang/go/src go1.24.2 regexp/Regexp#FindString().(chainedBridgeBandwidthEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthEnv..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1., "ip", "addr"))
169 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(chainedBridgeIP).Toscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#To().(ContainSubstringscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/ContainSubstring().("10.12.2."))
170
171 Byscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/By().(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("adding %s to %s\n\n", "basic-bridge", contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2..ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().()))
172 basicBridgeEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeEnv..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS., cnitoolBinscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:cnitoolBin., "add", "network-chain-test", contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2..LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().())
173 basicBridgeIP := ipRegexp.FindStringscip-go gomod github.com/golang/go/src go1.24.2 regexp/Regexp#FindString().(basicBridgeEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeEnv..runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2., "ip", "addr"))
174 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(basicBridgeIP).Toscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#To().(ContainSubstringscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/ContainSubstring().("10.11.2."))
175
176 var chainedBridgeBandwidthPortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthPort., basicBridgePortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgePort. int
177
178 Byscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/By().(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("starting echo server in %s\n\n", contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1..ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().()))
179 chainedBridgeBandwidthPortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthPort., chainedBridgeBandwidthSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthSession. = startEchoServerInNamespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/startEchoServerInNamespace().(contNS1scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS1.)
180
181 Byscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/By().(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("starting echo server in %s\n\n", contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2..ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().()))
182 basicBridgePortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgePort., basicBridgeSessionscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgeSession. = startEchoServerInNamespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/startEchoServerInNamespace().(contNS2scip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:contNS2.)
183
184 packetInBytes := 20000 // The shaper needs to 'warm'. Send enough to cause it to throttle,
185 // balanced by run time.
186
187 Byscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/By().(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("sending tcp traffic to the chained, bridged, traffic shaped container on ip address '%s:%d'\n\n", chainedBridgeIP, chainedBridgeBandwidthPortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthPort.))
188 start := timescip-go gomod github.com/golang/go/src go1.24.2 time/.Nowscip-go gomod github.com/golang/go/src go1.24.2 time/Now().()
189 makeTCPClientInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/makeTCPClientInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS..ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().(), chainedBridgeIP, chainedBridgeBandwidthPortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:chainedBridgeBandwidthPort., packetInBytes)
190 runtimeWithLimit := timescip-go gomod github.com/golang/go/src go1.24.2 time/.Sincescip-go gomod github.com/golang/go/src go1.24.2 time/Since().(start)
191 logscip-go gomod github.com/golang/go/src go1.24.2 log/.Printfscip-go gomod github.com/golang/go/src go1.24.2 log/Printf().("Runtime with qos limit %.2f seconds", runtimeWithLimit.Secondsscip-go gomod github.com/golang/go/src go1.24.2 time/Duration#Seconds().())
192
193 Byscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/By().(fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("sending tcp traffic to the basic bridged container on ip address '%s:%d'\n\n", basicBridgeIP, basicBridgePortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgePort.))
194 start = timescip-go gomod github.com/golang/go/src go1.24.2 time/.Nowscip-go gomod github.com/golang/go/src go1.24.2 time/Now().()
195 makeTCPClientInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/makeTCPClientInNS().(hostNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:hostNS..ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().(), basicBridgeIP, basicBridgePortscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/_:basicBridgePort., packetInBytes)
196 runtimeWithoutLimit := timescip-go gomod github.com/golang/go/src go1.24.2 time/.Sincescip-go gomod github.com/golang/go/src go1.24.2 time/Since().(start)
197 logscip-go gomod github.com/golang/go/src go1.24.2 log/.Printfscip-go gomod github.com/golang/go/src go1.24.2 log/Printf().("Runtime without qos limit %.2f seconds", runtimeWithoutLimit.Secondsscip-go gomod github.com/golang/go/src go1.24.2 time/Duration#Seconds().())
198
199 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(runtimeWithLimit).Toscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#To().(BeNumericallyscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/BeNumerically().(">", runtimeWithoutLimit+1000*timescip-go gomod github.com/golang/go/src go1.24.2 time/.Millisecondscip-go gomod github.com/golang/go/src go1.24.2 time/Millisecond.))
200 })
201 })
202 })
203
204 type TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv# []string
205
206 func (e TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#) runscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#run().(bin string, args ...string) string {
207 cmd := execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/.Commandscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Command().(bin, args...)
208 cmd.Envscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Cmd#Env. = e
209 session, err := gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/.Startscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Start().(cmd, GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter., GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter.)
210 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
211 Eventuallyscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Eventually().(session, "5s").Shouldscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/.Exitscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Exit().(0))
212 return string(session.Outscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Out..Contentsscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gbytes`/Buffer#Contents().())
213 }
214
215 func (e TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#) runInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#runInNS().(nsShortName Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#, bin string, args ...string) string {
216 a := append([]string{"netns", "exec", string(nsShortName), bin}, args...)
217 return e.runscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#run().("ip", a...)
218 }
219
220 type Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace# string
221
222 func (n Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#) LongNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#LongName().() string {
223 return fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("/var/run/netns/%s", n)
224 }
225
226 func (n Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#) ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().() string {
227 return string(n)
228 }
229
230 func (n Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#) Addscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Add().() {
231 (TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#{}).runscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#run().("ip", "netns", "add", string(n))
232 }
233
234 func (n Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#) Delscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#Del().() {
235 (TestEnvscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#{}).runscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/TestEnv#run().("ip", "netns", "del", string(n))
236 }
237
238 func makeTCPClientInNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/makeTCPClientInNS().(netns string, address string, port int, numBytes int) {
239 payload := bytesscip-go gomod github.com/golang/go/src go1.24.2 bytes/.Repeatscip-go gomod github.com/golang/go/src go1.24.2 bytes/Repeat().([]byte{'a'}, numBytes)
240 message := string(payload)
241
242 var cmd *execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/.Cmdscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Cmd#
243 if netns != "" {
244 netns = filepathscip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/.Basescip-go gomod github.com/golang/go/src go1.24.2 `path/filepath`/Base().(netns)
245 cmd = execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/.Commandscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Command().("ip", "netns", "exec", netns, echoClientBinaryPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/echoClientBinaryPath., "--target", fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("%s:%d", address, port), "--message", message)
246 } else {
247 cmd = execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/.Commandscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Command().(echoClientBinaryPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/echoClientBinaryPath., "--target", fmtscip-go gomod github.com/golang/go/src go1.24.2 fmt/.Sprintfscip-go gomod github.com/golang/go/src go1.24.2 fmt/Sprintf().("%s:%d", address, port), "--message", message)
248 }
249 cmd.Stdinscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Cmd#Stdin. = bytesscip-go gomod github.com/golang/go/src go1.24.2 bytes/.NewBufferscip-go gomod github.com/golang/go/src go1.24.2 bytes/NewBuffer().([]byte(message))
250 cmd.Stderrscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Cmd#Stderr. = GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter.
251 out, err := cmd.Outputscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Cmd#Output().()
252
253 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
254 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(string(out)).Toscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#To().(Equalscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Equal().(message))
255 }
256
257 func startEchoServerInNamespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/startEchoServerInNamespace().(netNS Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#) (int, *gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/.Sessionscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#) {
258 session, err := startInNetNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/startInNetNS().(echoServerBinaryPathscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/echoServerBinaryPath., netNS)
259 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
260
261 // wait for it to print it's address on stdout
262 Eventuallyscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Eventually().(session.Outscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Out.).Shouldscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/AsyncAssertion#Should().(gbytesscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gbytes`/.Sayscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gbytes`/Say().("\n"))
263 _, portString, err := netscip-go gomod github.com/golang/go/src go1.24.2 net/.SplitHostPortscip-go gomod github.com/golang/go/src go1.24.2 net/SplitHostPort().(stringsscip-go gomod github.com/golang/go/src go1.24.2 strings/.TrimSpacescip-go gomod github.com/golang/go/src go1.24.2 strings/TrimSpace().(string(session.Outscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Out..Contentsscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gbytes`/Buffer#Contents().())))
264 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
265
266 port, err := strconvscip-go gomod github.com/golang/go/src go1.24.2 strconv/.Atoiscip-go gomod github.com/golang/go/src go1.24.2 strconv/Atoi().(portString)
267 Expectscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/Expect().(err).NotToscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/types`/Assertion#NotTo().(HaveOccurredscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega`/HaveOccurred().())
268
269 go func() {
270 // print out echoserver output to ginkgo to capture any errors that might be occurring.
271 ioscip-go gomod github.com/golang/go/src go1.24.2 io/.Copyscip-go gomod github.com/golang/go/src go1.24.2 io/Copy().(GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter., ioscip-go gomod github.com/golang/go/src go1.24.2 io/.MultiReaderscip-go gomod github.com/golang/go/src go1.24.2 io/MultiReader().(session.Outscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Out., session.Errscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#Err.))
272 }()
273
274 return port, session
275 }
276
277 func startInNetNSscip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/startInNetNS().(binPath string, namespace Namespacescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#) (*gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/.Sessionscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Session#, error) {
278 cmd := execscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/.Commandscip-go gomod github.com/golang/go/src go1.24.2 `os/exec`/Command().("ip", "netns", "exec", namespace.ShortNamescip-go gomod github.com/containernetworking/plugins . `github.com/containernetworking/plugins/integration_test`/Namespace#ShortName().(), binPath)
279 return gexecscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/.Startscip-go gomod github.com/onsi/gomega v1.38.1 `github.com/onsi/gomega/gexec`/Start().(cmd, GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter., GinkgoWriterscip-go gomod github.com/onsi/ginkgo/v2 v2.25.1 `github.com/onsi/ginkgo/v2`/GinkgoWriter.)
280 }