wip
This commit is contained in:
parent
5a1a4a1eec
commit
8e1b3a178a
|
|
@ -13,6 +13,10 @@ issues:
|
|||
linters:
|
||||
- dupl
|
||||
- lll
|
||||
- path: (.+)_test.go
|
||||
linters:
|
||||
- dupl
|
||||
- lll
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
|
|
@ -26,7 +30,7 @@ linters:
|
|||
- gosimple
|
||||
- govet
|
||||
- ineffassign
|
||||
- lll
|
||||
#- lll
|
||||
- misspell
|
||||
- nakedret
|
||||
- prealloc
|
||||
|
|
|
|||
|
|
@ -267,7 +267,11 @@ func (in *SecurityValidator) download() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer out.Close()
|
||||
defer func() {
|
||||
if err := out.Close(); err != nil {
|
||||
jenkinslog.V(log.VDebug).Info("Failed to close file", err)
|
||||
}
|
||||
}()
|
||||
|
||||
req, err := http.NewRequest(http.MethodGet, Hosturl, nil)
|
||||
if err != nil {
|
||||
|
|
@ -286,6 +290,10 @@ func (in *SecurityValidator) download() error {
|
|||
|
||||
defer response.Body.Close()
|
||||
|
||||
if err := out.Close(); err != nil {
|
||||
jenkinslog.V(log.VDebug).Info("Failed to send file", err)
|
||||
}
|
||||
|
||||
_, err = io.Copy(out, response.Body)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,11 +166,11 @@ func TestSMTP_Send(t *testing.T) {
|
|||
},
|
||||
}}
|
||||
|
||||
ts := &testServer{event: e}
|
||||
//ts := &testServer{event: e}
|
||||
|
||||
// Create fake SMTP server
|
||||
|
||||
s := smtp.NewServer(ts)
|
||||
s := smtp.NewServer()
|
||||
|
||||
s.Addr = fmt.Sprintf(":%d", testSMTPPort)
|
||||
s.Domain = "localhost"
|
||||
|
|
|
|||
Loading…
Reference in New Issue