summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-16 07:32:58 +0000
committerGitHub <noreply@github.com>2022-06-16 07:32:58 +0000
commita90dac9454698fd024bcac49b371701355ffaf24 (patch)
treeb167036c22fd48d683eb03e39bf8b00aebbc4708
parent78c149ff9129934b5948d01d1178a5427b5b0753 (diff)
parent21819254ddb7d48f3483cadcecb20a63d1db8cd7 (diff)
downloadpodman-a90dac9454698fd024bcac49b371701355ffaf24.tar.gz
podman-a90dac9454698fd024bcac49b371701355ffaf24.tar.bz2
podman-a90dac9454698fd024bcac49b371701355ffaf24.zip
Merge pull request #14605 from Luap99/update-golangci-lint
golangci-lint: update to v1.46.2
-rw-r--r--.golangci.yml2
-rw-r--r--Makefile2
-rw-r--r--test/e2e/systemd_activate_test.go8
3 files changed, 8 insertions, 4 deletions
diff --git a/.golangci.yml b/.golangci.yml
index 31b0416fa..d8e80ec27 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -55,6 +55,8 @@ linters:
- varnamelen
- maintidx
- nilnil
+ - nonamedreturns
+ - exhaustruct
# deprecated linters
- golint # replaced by revive
- scopelint # replaced by exportloopref
diff --git a/Makefile b/Makefile
index 3810459b0..38ea7a256 100644
--- a/Makefile
+++ b/Makefile
@@ -829,7 +829,7 @@ install.tools: .install.ginkgo .install.golangci-lint .install.bats ## Install n
.PHONY: .install.golangci-lint
.install.golangci-lint:
- VERSION=1.45.2 ./hack/install_golangci.sh
+ VERSION=1.46.2 ./hack/install_golangci.sh
.PHONY: .install.md2man
.install.md2man:
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{