tests: introduce e2e suite (#422)
* mock: implement GetStatsSummary Signed-off-by: Paulo Pires <pjpires@gmail.com> * make: use skaffold to deploy vk Signed-off-by: Paulo Pires <pjpires@gmail.com> * test: add an e2e test suite Signed-off-by: Paulo Pires <pjpires@gmail.com> * test: add vendored code Signed-off-by: Paulo Pires <pjpires@gmail.com> * docs: update README.md Signed-off-by: Paulo Pires <pjpires@gmail.com> * ci: run e2e on circleci Signed-off-by: Paulo Pires <pjpires@gmail.com> * make: improve the skaffold target Signed-off-by: Paulo Pires <pjpires@gmail.com> * e2e: fix defer pod deletion Signed-off-by: Paulo Pires <pjpires@gmail.com> * e2e: improve instructions Signed-off-by: Paulo Pires <pjpires@gmail.com> * makefile: default shell is bash Signed-off-by: Paulo Pires <pjpires@gmail.com>
This commit is contained in:
23
vendor/github.com/vmware/vic/lib/apiservers/engine/network/utils.go
generated
vendored
23
vendor/github.com/vmware/vic/lib/apiservers/engine/network/utils.go
generated
vendored
@@ -52,24 +52,29 @@ var (
|
||||
|
||||
cbpLock sync.Mutex
|
||||
ContainerByPort map[string]string // port:containerID
|
||||
once sync.Once
|
||||
)
|
||||
|
||||
func init() {
|
||||
portMapper = portmap.NewPortMapper()
|
||||
btbRules = make(map[string][]string)
|
||||
ContainerByPort = make(map[string]string)
|
||||
}
|
||||
|
||||
l, err := netlink.LinkByName(publicIfaceName)
|
||||
if l == nil {
|
||||
l, err = netlink.LinkByAlias(publicIfaceName)
|
||||
if err != nil {
|
||||
log.Errorf("interface %s not found", publicIfaceName)
|
||||
return
|
||||
func Init() {
|
||||
once.Do(func() {
|
||||
l, err := netlink.LinkByName(publicIfaceName)
|
||||
if l == nil {
|
||||
l, err = netlink.LinkByAlias(publicIfaceName)
|
||||
if err != nil {
|
||||
log.Errorf("interface %s not found", publicIfaceName)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// don't use interface alias for iptables rules
|
||||
publicIfaceName = l.Attrs().Name
|
||||
// don't use interface alias for iptables rules
|
||||
publicIfaceName = l.Attrs().Name
|
||||
})
|
||||
}
|
||||
|
||||
// requestHostPort finds a free port on the host
|
||||
|
||||
Reference in New Issue
Block a user