mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-01 16:45:36 +08:00
fix: [cherry-pick] Align minio object storage ut to new minio server behavior (#29015)
cherry-pick from master pr: #29014 See also #29013 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
51614073ec
commit
2e82d65124
@ -153,19 +153,21 @@ func TestMinioObjectStorage(t *testing.T) {
|
||||
key string
|
||||
value []byte
|
||||
}{
|
||||
{false, "abc/", []byte("123")},
|
||||
// {true, "abc/", []byte("123")}, will write as abc
|
||||
{true, "abc/d", []byte("1234")},
|
||||
{false, "abc/d/e", []byte("12345")},
|
||||
{true, "abc/d/e", []byte("12345")},
|
||||
{true, "abc/e/d", []byte("12354")},
|
||||
{true, "key_/1/1", []byte("111")},
|
||||
{true, "key_/1/2", []byte("222")},
|
||||
{false, "key_/1/2/3", []byte("333")},
|
||||
{true, "key_/1/2/3", []byte("333")},
|
||||
{true, "key_/2/3", []byte("333")},
|
||||
}
|
||||
|
||||
for _, test := range prepareTests {
|
||||
err := testCM.PutObject(ctx, config.bucketName, test.key, bytes.NewReader(test.value), int64(len(test.value)))
|
||||
require.Equal(t, test.valid, err == nil)
|
||||
t.Run(test.key, func(t *testing.T) {
|
||||
err := testCM.PutObject(ctx, config.bucketName, test.key, bytes.NewReader(test.value), int64(len(test.value)))
|
||||
require.Equal(t, test.valid, err == nil)
|
||||
})
|
||||
}
|
||||
|
||||
insertWithPrefixTests := []struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user