mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 20:38:08 +08:00
ci: update golangci-lint version (#1834)
Signed-off-by: Ramkumar Chinchani <rchincha@cisco.com>
This commit is contained in:
committed by
GitHub
parent
7ce5a74598
commit
1675f30d4a
@@ -654,7 +654,7 @@ func getMockImageSummary() common.ImageSummary {
|
||||
func TestUtils(t *testing.T) {
|
||||
Convey("Utils", t, func() {
|
||||
ok := haveSameArgs(field{"query", []struct {
|
||||
Name string "json:\"name\""
|
||||
Name string `json:"name"`
|
||||
}{
|
||||
{Name: "arg1"}, {Name: "arg2"},
|
||||
}}, GQLQuery{
|
||||
@@ -663,7 +663,7 @@ func TestUtils(t *testing.T) {
|
||||
So(ok, ShouldBeFalse)
|
||||
|
||||
ok = haveSameArgs(field{"query", []struct {
|
||||
Name string "json:\"name\""
|
||||
Name string `json:"name"`
|
||||
}{
|
||||
{Name: "arg1"}, {Name: "arg2"},
|
||||
}}, GQLQuery{
|
||||
|
||||
@@ -88,7 +88,7 @@ func TestConfigReloader(t *testing.T) {
|
||||
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
// err = cfgfile.Close()
|
||||
@@ -216,7 +216,7 @@ func TestConfigReloader(t *testing.T) {
|
||||
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
// err = cfgfile.Close()
|
||||
@@ -341,7 +341,7 @@ func TestConfigReloader(t *testing.T) {
|
||||
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
os.Args = []string{"cli_test", "serve", cfgfile.Name()}
|
||||
@@ -463,7 +463,7 @@ func TestConfigReloader(t *testing.T) {
|
||||
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
// err = cfgfile.Close()
|
||||
|
||||
@@ -392,7 +392,7 @@ func TestServeExtensions(t *testing.T) {
|
||||
cfgfile, err := os.CreateTemp("", "zot-test*.json")
|
||||
So(err, ShouldBeNil)
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
err = cfgfile.Close()
|
||||
So(err, ShouldBeNil)
|
||||
@@ -435,7 +435,7 @@ func TestServeExtensions(t *testing.T) {
|
||||
cfgfile, err := os.CreateTemp("", "zot-test*.json")
|
||||
So(err, ShouldBeNil)
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
err = cfgfile.Close()
|
||||
So(err, ShouldBeNil)
|
||||
@@ -467,7 +467,7 @@ func testWithMetricsEnabled(cfgContentFormat string) {
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
err = cfgfile.Close()
|
||||
So(err, ShouldBeNil)
|
||||
@@ -595,7 +595,7 @@ func TestServeMetricsExtension(t *testing.T) {
|
||||
cfgfile, err := os.CreateTemp("", "zot-test*.json")
|
||||
So(err, ShouldBeNil)
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
err = cfgfile.Close()
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
@@ -1376,7 +1376,7 @@ func runCLIWithConfig(tempDir string, config string) (string, error) {
|
||||
|
||||
config = fmt.Sprintf(config, tempDir, port, logFile.Name())
|
||||
|
||||
_, err = cfgfile.Write([]byte(config))
|
||||
_, err = cfgfile.WriteString(config)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ func TestSressTooManyOpenFiles(t *testing.T) {
|
||||
cfgfile, err := os.CreateTemp("", "zot-test*.json")
|
||||
So(err, ShouldBeNil)
|
||||
defer os.Remove(cfgfile.Name()) // clean up
|
||||
_, err = cfgfile.Write([]byte(content))
|
||||
_, err = cfgfile.WriteString(content)
|
||||
So(err, ShouldBeNil)
|
||||
err = cfgfile.Close()
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
Reference in New Issue
Block a user