mirror of
https://github.com/restic/restic.git
synced 2025-12-08 06:09:56 +00:00
Update dependencies
Among others, this updates minio-go, so that the new "eu-west-3" zone for AWS is supported.
This commit is contained in:
parent
b63de7c798
commit
2b39f9f4b2
3435 changed files with 1318042 additions and 315692 deletions
22
vendor/github.com/sirupsen/logrus/hook_test.go
generated
vendored
22
vendor/github.com/sirupsen/logrus/hook_test.go
generated
vendored
|
|
@ -1,6 +1,7 @@
|
|||
package logrus
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
|
@ -120,3 +121,24 @@ func TestErrorHookShouldFireOnError(t *testing.T) {
|
|||
assert.Equal(t, hook.Fired, true)
|
||||
})
|
||||
}
|
||||
|
||||
func TestAddHookRace(t *testing.T) {
|
||||
var wg sync.WaitGroup
|
||||
wg.Add(2)
|
||||
hook := new(ErrorHook)
|
||||
LogAndAssertJSON(t, func(log *Logger) {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
log.AddHook(hook)
|
||||
}()
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
log.Error("test")
|
||||
}()
|
||||
wg.Wait()
|
||||
}, func(fields Fields) {
|
||||
// the line may have been logged
|
||||
// before the hook was added, so we can't
|
||||
// actually assert on the hook
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue