Skip to content

Commit

Permalink
test: improve special character test case (#4335)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhijian-pro authored Jan 16, 2024
1 parent 6371a10 commit 06f42be
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/mutate-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ jobs:
go install github.com/zimmski/go-mutesting/cmd/go-mutesting@latest
sudo .github/scripts/apt_install.sh g++-multilib redis-server libacl1-dev attr python3-tk
sudo pip install mysqlclient
apt -y install glusterfs-server
- name: Prepare Database
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion cmd/objbench.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,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 06f42be

Please sign in to comment.