Skip to content

Commit

Permalink
test: improve special character test case
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro committed Jan 11, 2024
1 parent 77ce951 commit 283326c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/objbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ func functionalTesting(blob object.ObjectStorage, result *[][]string, colorful b
})

runCase("special key", func(blob object.ObjectStorage) error {
key := "测试编码文件" + `{"name":"juicefs"}` + string('\u001F')
key := "测试编码文件" + `{"name":"juicefs"}` + string('\u001F') + "%uFF081%uFF09.jpg"
defer blob.Delete(key) //nolint:errcheck
if err := blob.Put(key, bytes.NewReader([]byte("1"))); err != nil {
return fmt.Errorf("put encode file failed: %s", err)
Expand Down
2 changes: 1 addition & 1 deletion pkg/object/object_storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func testStorage(t *testing.T, s ObjectStorage) {
}
}()

key := "测试编码文件" + `{"name":"zhijian"}` + string('\u001F')
key := "测试编码文件" + `{"name":"juicefs"}` + string('\u001F') + "%uFF081%uFF09.jpg"
if err := s.Put(key, bytes.NewReader(nil)); err != nil {
t.Logf("PUT testEncodeFile failed: %s", err.Error())
} else {
Expand Down

0 comments on commit 283326c

Please sign in to comment.