mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 23:33:30 +03: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:
committed by
Harshavardhana
parent
d86973dcca
commit
4fb5fc72d7
@@ -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