mirror of
https://github.com/restic/restic.git
synced 2026-06-25 18:14: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:
+16
-14
@@ -32,6 +32,7 @@ import (
|
||||
"github.com/golang/protobuf/ptypes"
|
||||
durpb "github.com/golang/protobuf/ptypes/duration"
|
||||
structpb "github.com/golang/protobuf/ptypes/struct"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/api/option"
|
||||
mrpb "google.golang.org/genproto/googleapis/api/monitoredres"
|
||||
@@ -183,7 +184,7 @@ func TestFromLogEntry(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if diff := testutil.Diff(got, want, testutil.IgnoreUnexported(http.Request{})); diff != "" {
|
||||
if diff := testutil.Diff(got, want, cmpopts.IgnoreUnexported(http.Request{})); diff != "" {
|
||||
t.Errorf("FullEntry:\n%s", diff)
|
||||
}
|
||||
|
||||
@@ -232,29 +233,30 @@ func TestFromLogEntry(t *testing.T) {
|
||||
|
||||
func TestListLogEntriesRequest(t *testing.T) {
|
||||
for _, test := range []struct {
|
||||
opts []EntriesOption
|
||||
projectIDs []string
|
||||
filter string
|
||||
orderBy string
|
||||
opts []EntriesOption
|
||||
resourceNames []string
|
||||
filter string
|
||||
orderBy string
|
||||
}{
|
||||
// Default is client's project ID, empty filter and orderBy.
|
||||
{nil,
|
||||
[]string{"PROJECT_ID"}, "", ""},
|
||||
{nil, []string{"projects/PROJECT_ID"}, "", ""},
|
||||
{[]EntriesOption{NewestFirst(), Filter("f")},
|
||||
[]string{"PROJECT_ID"}, "f", "timestamp desc"},
|
||||
[]string{"projects/PROJECT_ID"}, "f", "timestamp desc"},
|
||||
{[]EntriesOption{ProjectIDs([]string{"foo"})},
|
||||
[]string{"foo"}, "", ""},
|
||||
[]string{"projects/foo"}, "", ""},
|
||||
{[]EntriesOption{ResourceNames([]string{"folders/F", "organizations/O"})},
|
||||
[]string{"folders/F", "organizations/O"}, "", ""},
|
||||
{[]EntriesOption{NewestFirst(), Filter("f"), ProjectIDs([]string{"foo"})},
|
||||
[]string{"foo"}, "f", "timestamp desc"},
|
||||
[]string{"projects/foo"}, "f", "timestamp desc"},
|
||||
{[]EntriesOption{NewestFirst(), Filter("f"), ProjectIDs([]string{"foo"})},
|
||||
[]string{"foo"}, "f", "timestamp desc"},
|
||||
[]string{"projects/foo"}, "f", "timestamp desc"},
|
||||
// If there are repeats, last one wins.
|
||||
{[]EntriesOption{NewestFirst(), Filter("no"), ProjectIDs([]string{"foo"}), Filter("f")},
|
||||
[]string{"foo"}, "f", "timestamp desc"},
|
||||
[]string{"projects/foo"}, "f", "timestamp desc"},
|
||||
} {
|
||||
got := listLogEntriesRequest("PROJECT_ID", test.opts)
|
||||
got := listLogEntriesRequest("projects/PROJECT_ID", test.opts)
|
||||
want := &logpb.ListLogEntriesRequest{
|
||||
ResourceNames: []string{"projects/" + test.projectIDs[0]},
|
||||
ResourceNames: test.resourceNames,
|
||||
Filter: test.filter,
|
||||
OrderBy: test.orderBy,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user