fix: skip integration tests without telegram secrets; apply modernize fix

This commit is contained in:
Bo-Yi Wu
2026-04-16 22:39:41 +08:00
parent c8d19e8231
commit 764f7b6bf6
2 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -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
View File
@@ -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"}`,
),
)
}
}
}))