summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2022-06-15 19:50:39 +0200
committerPaul Holzinger <pholzing@redhat.com>2022-06-15 19:58:30 +0200
commit21819254ddb7d48f3483cadcecb20a63d1db8cd7 (patch)
treeb099423296b2282910ae5febffdb3c8a3026d1ad /test/e2e
parent08f35dab5a1dc961992430373415492cf7c1963a (diff)
downloadpodman-21819254ddb7d48f3483cadcecb20a63d1db8cd7.tar.gz
podman-21819254ddb7d48f3483cadcecb20a63d1db8cd7.tar.bz2
podman-21819254ddb7d48f3483cadcecb20a63d1db8cd7.zip
golangci-lint: update to v1.46.2
Update to the latest golangci-lint version. v1.46 added new linters. I disabled nonamedreturns and exhaustruct since they enforce a certain code style and using them would require big changes to the code base. The nosprintfhostport is new and I fixed one problem in the tests. While the test itself is fine because it uses ipv4 only the linter still looks good because the sprintf use will fail for ipv6 addresses. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/systemd_activate_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/e2e/systemd_activate_test.go b/test/e2e/systemd_activate_test.go
index c50e43b8d..240139b98 100644
--- a/test/e2e/systemd_activate_test.go
+++ b/test/e2e/systemd_activate_test.go
@@ -8,6 +8,7 @@ import (
"os"
"os/exec"
"path/filepath"
+ "strconv"
"syscall"
"time"
@@ -61,9 +62,10 @@ var _ = Describe("Systemd activate", func() {
host := "127.0.0.1"
port, err := podmanUtils.GetRandomPort()
Expect(err).ToNot(HaveOccurred())
+ addr := net.JoinHostPort(host, strconv.Itoa(port))
activateSession := testUtils.StartSystemExec(activate, []string{
- fmt.Sprintf("--listen=%s:%d", host, port),
+ "--listen", addr,
podmanTest.PodmanBinary,
"--root=" + filepath.Join(tempDir, "server_root"),
"system", "service",
@@ -73,7 +75,7 @@ var _ = Describe("Systemd activate", func() {
// Curried functions for specialized podman calls
podmanRemote := func(args ...string) *testUtils.PodmanSession {
- args = append([]string{"--url", fmt.Sprintf("tcp://%s:%d", host, port)}, args...)
+ args = append([]string{"--url", "tcp://" + addr}, args...)
return testUtils.SystemExec(podmanTest.RemotePodmanBinary, args)
}
@@ -111,7 +113,7 @@ var _ = Describe("Systemd activate", func() {
port, err := podmanUtils.GetRandomPort()
Expect(err).ToNot(HaveOccurred())
- addr := fmt.Sprintf("%s:%d", host, port)
+ addr := net.JoinHostPort(host, strconv.Itoa(port))
// start systemd activation with datagram socket
activateSession := testUtils.StartSystemExec(activate, []string{