mirror of
https://github.com/restic/restic.git
synced 2026-08-09 07:03:17 +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:
+3
-3
@@ -635,15 +635,15 @@ func profileeWork() {
|
||||
var b bytes.Buffer
|
||||
gz := gzip.NewWriter(&b)
|
||||
if _, err := gz.Write(data); err != nil {
|
||||
log.Printf("failed to write to gzip stream", err)
|
||||
log.Println("failed to write to gzip stream", err)
|
||||
return
|
||||
}
|
||||
if err := gz.Flush(); err != nil {
|
||||
log.Printf("failed to flush to gzip stream", err)
|
||||
log.Println("failed to flush to gzip stream", err)
|
||||
return
|
||||
}
|
||||
if err := gz.Close(); err != nil {
|
||||
log.Printf("failed to close gzip stream", err)
|
||||
log.Println("failed to close gzip stream", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+7
-3
@@ -16,9 +16,10 @@ package profiler
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"cloud.google.com/go/internal/testutil"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"github.com/google/pprof/profile"
|
||||
)
|
||||
|
||||
@@ -35,6 +36,9 @@ func (f *fakeFunc) FileLine(_ uintptr) (string, int) {
|
||||
return f.file, f.lineno
|
||||
}
|
||||
|
||||
var cmpOpt = cmpopts.IgnoreUnexported(profile.Profile{}, profile.Function{},
|
||||
profile.Line{}, profile.Location{}, profile.Sample{}, profile.ValueType{})
|
||||
|
||||
// TestRuntimeFunctionTrimming tests if symbolize trims runtime functions as intended.
|
||||
func TestRuntimeFunctionTrimming(t *testing.T) {
|
||||
fakeFuncMap := map[uintptr]*fakeFunc{
|
||||
@@ -116,7 +120,7 @@ func TestRuntimeFunctionTrimming(t *testing.T) {
|
||||
}
|
||||
for i := 0; i < 2; i++ {
|
||||
symbolize(testProfiles[i])
|
||||
if !reflect.DeepEqual(testProfiles[i], wantProfiles[i]) {
|
||||
if !testutil.Equal(testProfiles[i], wantProfiles[i], cmpOpt) {
|
||||
t.Errorf("incorrect trimming (testcase = %d): got {%v}, want {%v}", i, testProfiles[i], wantProfiles[i])
|
||||
}
|
||||
}
|
||||
@@ -195,7 +199,7 @@ func TestParseAndSymbolize(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Errorf("parsing symbolized profile (testcase = %d) got err: %v, want no error", i, err)
|
||||
}
|
||||
if !reflect.DeepEqual(gotProfile, wantProfile) {
|
||||
if !testutil.Equal(gotProfile, wantProfile, cmpOpt) {
|
||||
t.Errorf("incorrect symbolization (testcase = %d): got {%v}, want {%v}", i, gotProfile, wantProfile)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user