mirror of
https://github.com/minio/minio.git
synced 2026-11-19 23:03:17 +00:00
GCS gateway allows apps to supply their own marker (#4495)
Most s3 compatible apps use object keys returned in listing as marker. This change allows this behaviour with gateway-gcs too.
This commit is contained in:
1 parent
d86973dcca
commit
4fb5fc72d7
3 files changed
+69
-10
No files matched your search
@@ -164,3 +164,35 @@ func TestIsGCSPrefix(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Test for isGCSMarker.
|
||||
func TestIsGCSMarker(t *testing.T) {
|
||||
testCases := []struct {
|
||||
marker string
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
marker: "##miniogcs123",
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
marker: "##mini_notgcs123",
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
marker: "#minioagainnotgcs123",
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
marker: "obj1",
|
||||
expected: false,
|
||||
},
|
||||
}
|
||||
|
||||
for i, tc := range testCases {
|
||||
if actual := isGCSMarker(tc.marker); actual != tc.expected {
|
||||
t.Errorf("Test %d: marker is %s, expected %v but got %v",
|
||||
i+1, tc.marker, tc.expected, actual)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user