mirror of https://github.com/milvus-io/milvus.git
fix: Align minio object storage ut to new minio server behavior (#29014)
See also #29013 Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>pull/29003/head^2
parent
4a067a4c8c
commit
6a86ac0ac6
|
@ -153,19 +153,21 @@ func TestMinioObjectStorage(t *testing.T) {
|
||||||
key string
|
key string
|
||||||
value []byte
|
value []byte
|
||||||
}{
|
}{
|
||||||
{false, "abc/", []byte("123")},
|
// {true, "abc/", []byte("123")}, will write as abc
|
||||||
{true, "abc/d", []byte("1234")},
|
{true, "abc/d", []byte("1234")},
|
||||||
{false, "abc/d/e", []byte("12345")},
|
{true, "abc/d/e", []byte("12345")},
|
||||||
{true, "abc/e/d", []byte("12354")},
|
{true, "abc/e/d", []byte("12354")},
|
||||||
{true, "key_/1/1", []byte("111")},
|
{true, "key_/1/1", []byte("111")},
|
||||||
{true, "key_/1/2", []byte("222")},
|
{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")},
|
{true, "key_/2/3", []byte("333")},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range prepareTests {
|
for _, test := range prepareTests {
|
||||||
err := testCM.PutObject(ctx, config.bucketName, test.key, bytes.NewReader(test.value), int64(len(test.value)))
|
t.Run(test.key, func(t *testing.T) {
|
||||||
require.Equal(t, test.valid, err == nil)
|
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 {
|
insertWithPrefixTests := []struct {
|
||||||
|
|
Loading…
Reference in New Issue