You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnstatus.Error(codes.InvalidArgument, "test fake expected resource name of the form \"instance/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"")
returnstatus.Errorf(codes.InvalidArgument, "test fake expected resource name of the form \"%s/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"", f.InstanceName)
589
603
}
590
604
// indexOffset for all 4+ paths - `compressed-blobs` paths have one more element.
returnstatus.Error(codes.InvalidArgument, "test fake expected resource name of the form \"instance/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"")
615
+
returnstatus.Errorf(codes.InvalidArgument, "test fake expected resource name of the form \"%s/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"", f.InstanceName)
602
616
}
603
617
dg, err:=digest.New(path[4+indexOffset], size)
604
618
iferr!=nil {
605
-
returnstatus.Error(codes.InvalidArgument, "test fake expected a valid digest as part of the resource name: \"instance/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"")
619
+
returnstatus.Errorf(codes.InvalidArgument, "test fake expected a valid digest as part of the resource name: \"%s/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"", f.InstanceName)
606
620
}
607
621
if_, err:=uuid.Parse(path[2]); err!=nil {
608
-
returnstatus.Error(codes.InvalidArgument, "test fake expected resource name of the form \"instance/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"")
622
+
returnstatus.Errorf(codes.InvalidArgument, "test fake expected resource name of the form \"%s/uploads/<uuid>/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"", f.InstanceName)
if (len(path) !=4&&len(path) !=5) ||path[0] !="instance"|| (path[1] !="blobs"&&path[1] !="compressed-blobs") {
696
-
returnstatus.Error(codes.InvalidArgument, "test fake expected resource name of the form \"instance/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"")
709
+
if (len(path) !=4&&len(path) !=5) ||path[0] !=f.InstanceName|| (path[1] !="blobs"&&path[1] !="compressed-blobs") {
710
+
returnstatus.Errorf(codes.InvalidArgument, "test fake expected resource name of the form \"%s/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"", f.InstanceName)
697
711
}
698
712
// indexOffset for all 2+ paths - `compressed-blobs` has one more URI element.
returnstatus.Error(codes.InvalidArgument, "test fake expected resource name of the form \"instance/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"")
720
+
returnstatus.Errorf(codes.InvalidArgument, "test fake expected resource name of the form \"%s/blobs|compressed-blobs/<compressor?>/<hash>/<size>\"", f.InstanceName)
0 commit comments