summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-07-04 10:12:20 +0200
committerCory Snider <csnider@mirantis.com>2023-02-24 17:05:41 -0500
commit057ea3492e14b6cd4e023057320c9e81ac34643a (patch)
tree93cfebfadbbaa480c92391be7c3d21ae5b3a35a6
parent2461d88305974822c5829a744a30a297a740a83f (diff)
downloaddocker-057ea3492e14b6cd4e023057320c9e81ac34643a.tar.gz
fix some minor linting issues
distribution/pull_v2_test.go:213:4: S1038: should use t.Fatalf(...) instead of t.Fatal(fmt.Sprintf(...)) (gosimple) t.Fatal(fmt.Sprintf("expected formatPlatform to show windows platform with a version, but got '%s'", result)) ^ integration-cli/docker_cli_build_test.go:5951:3: S1038: should use c.Skipf(...) instead of c.Skip(fmt.Sprintf(...)) (gosimple) c.Skip(fmt.Sprintf("Bug fixed in 18.06 or higher.Skipping it for %s", testEnv.DaemonInfo.ServerVersion)) ^ integration-cli/docker_cli_daemon_test.go:240:3: S1038: should use c.Skipf(...) instead of c.Skip(fmt.Sprintf(...)) (gosimple) c.Skip(fmt.Sprintf("New base device size (%v) must be greater than (%s)", units.HumanSize(float64(newBasesizeBytes)), units.HumanSize(float64(oldBasesizeBytes)))) ^ Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit 968ff5ab44b1846964e832d4509e17f814d6116d) Signed-off-by: Cory Snider <csnider@mirantis.com>
-rw-r--r--distribution/pull_v2_test.go3
-rw-r--r--integration-cli/docker_cli_build_test.go4
-rw-r--r--integration-cli/docker_cli_daemon_test.go2
3 files changed, 2 insertions, 7 deletions
diff --git a/distribution/pull_v2_test.go b/distribution/pull_v2_test.go
index 1eaa265005..31fa336bdc 100644
--- a/distribution/pull_v2_test.go
+++ b/distribution/pull_v2_test.go
@@ -3,7 +3,6 @@ package distribution // import "github.com/docker/docker/distribution"
import (
"context"
"encoding/json"
- "fmt"
"net/http"
"net/http/httptest"
"net/url"
@@ -210,7 +209,7 @@ func TestFormatPlatform(t *testing.T) {
}
matches, _ := regexp.MatchString("windows.* [0-9]", result)
if !matches {
- t.Fatal(fmt.Sprintf("expected formatPlatform to show windows platform with a version, but got '%s'", result))
+ t.Fatalf("expected formatPlatform to show windows platform with a version, but got '%s'", result)
}
}
}
diff --git a/integration-cli/docker_cli_build_test.go b/integration-cli/docker_cli_build_test.go
index 34f61b450f..0b1911a5de 100644
--- a/integration-cli/docker_cli_build_test.go
+++ b/integration-cli/docker_cli_build_test.go
@@ -5936,10 +5936,6 @@ func (s *DockerSuite) TestBuildMultiStageResetScratch(c *testing.T) {
}
func (s *DockerSuite) TestBuildIntermediateTarget(c *testing.T) {
- //todo: need to be removed after 18.06 release
- if strings.Contains(testEnv.DaemonInfo.ServerVersion, "18.05.0") {
- c.Skip(fmt.Sprintf("Bug fixed in 18.06 or higher.Skipping it for %s", testEnv.DaemonInfo.ServerVersion))
- }
dockerfile := `
FROM busybox AS build-env
CMD ["/dev"]
diff --git a/integration-cli/docker_cli_daemon_test.go b/integration-cli/docker_cli_daemon_test.go
index 443f12e96e..74ce390257 100644
--- a/integration-cli/docker_cli_daemon_test.go
+++ b/integration-cli/docker_cli_daemon_test.go
@@ -237,7 +237,7 @@ func (s *DockerDaemonSuite) TestDaemonRestartWithIncreasedBasesize(c *testing.T)
var newBasesizeBytes int64 = 53687091200 // 50GB in bytes
if newBasesizeBytes < oldBasesizeBytes {
- c.Skip(fmt.Sprintf("New base device size (%v) must be greater than (%s)", units.HumanSize(float64(newBasesizeBytes)), units.HumanSize(float64(oldBasesizeBytes))))
+ c.Skipf("New base device size (%v) must be greater than (%s)", units.HumanSize(float64(newBasesizeBytes)), units.HumanSize(float64(oldBasesizeBytes)))
}
err := s.d.RestartWithError("--storage-opt", fmt.Sprintf("dm.basesize=%d", newBasesizeBytes))