Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: improve special character test case #4335

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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