mirror of
https://github.com/appleboy/drone-jenkins.git
synced 2026-06-04 10:15:02 +08:00
fix: skip integration tests without telegram secrets; apply modernize fix
This commit is contained in:
+1
-1
@@ -233,7 +233,7 @@ func (jenkins *Jenkins) sendRequest(
|
||||
req.Header.Set(crumb.CrumbRequestField, crumb.Crumb)
|
||||
}
|
||||
|
||||
return jenkins.Client.Do(req)
|
||||
return jenkins.Client.Do(req) //nolint:gosec // user-configured Jenkins URL
|
||||
}
|
||||
|
||||
func (jenkins *Jenkins) get(
|
||||
|
||||
+10
-2
@@ -347,7 +347,11 @@ func TestWaitForCompletion(t *testing.T) {
|
||||
[]byte(`{"number":456,"building":true,"duration":0,"result":null}`),
|
||||
)
|
||||
} else {
|
||||
_, _ = w.Write([]byte(`{"number":456,"building":false,"duration":5000,"result":"SUCCESS"}`))
|
||||
_, _ = w.Write(
|
||||
[]byte(
|
||||
`{"number":456,"building":false,"duration":5000,"result":"SUCCESS"}`,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
}))
|
||||
@@ -470,7 +474,11 @@ func TestWaitForCompletion(t *testing.T) {
|
||||
[]byte(`{"number":456,"building":true,"duration":0,"result":null}`),
|
||||
)
|
||||
} else {
|
||||
_, _ = w.Write([]byte(`{"number":456,"building":false,"duration":3000,"result":"FAILURE"}`))
|
||||
_, _ = w.Write(
|
||||
[]byte(
|
||||
`{"number":456,"building":false,"duration":3000,"result":"FAILURE"}`,
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
Reference in New Issue
Block a user