fix devops go vet (#1928)

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2020-03-07 12:46:09 +08:00
committed by GitHub
parent 148a804726
commit 7270307b66
348 changed files with 15268 additions and 55930 deletions

View File

@@ -48,7 +48,7 @@ func Test_NoScmPipelineConfig_Discarder(t *testing.T) {
Description: "for test",
Jenkinsfile: "node{echo 'hello'}",
Discarder: &devops.DiscarderProperty{
"3", "5",
DaysToKeep: "3", NumToKeep: "5",
},
},
{
@@ -56,7 +56,7 @@ func Test_NoScmPipelineConfig_Discarder(t *testing.T) {
Description: "for test",
Jenkinsfile: "node{echo 'hello'}",
Discarder: &devops.DiscarderProperty{
"3", "",
DaysToKeep: "3", NumToKeep: "",
},
},
{
@@ -64,7 +64,7 @@ func Test_NoScmPipelineConfig_Discarder(t *testing.T) {
Description: "for test",
Jenkinsfile: "node{echo 'hello'}",
Discarder: &devops.DiscarderProperty{
"", "21321",
DaysToKeep: "", NumToKeep: "21321",
},
},
{
@@ -72,7 +72,7 @@ func Test_NoScmPipelineConfig_Discarder(t *testing.T) {
Description: "for test",
Jenkinsfile: "node{echo 'hello'}",
Discarder: &devops.DiscarderProperty{
"", "",
DaysToKeep: "", NumToKeep: "",
},
},
}

View File

@@ -13,7 +13,7 @@ func TestFakeS3(t *testing.T) {
if err != nil {
t.Fatal(err)
}
o, ok := s3.storage["hello"]
o, ok := s3.Storage["hello"]
if !ok {
t.Fatal("should have hello object")
}
@@ -41,7 +41,7 @@ func TestFakeS3(t *testing.T) {
if err != nil {
t.Fatal(err)
}
_, ok = s3.storage["hello"]
_, ok = s3.Storage["hello"]
if ok {
t.Fatal("should not have hello object")
}