Enable testifylint rules (#34075)
Some checks failed
release-nightly / nightly-binary (push) Has been cancelled
release-nightly / nightly-docker-rootful (push) Has been cancelled
release-nightly / nightly-docker-rootless (push) Has been cancelled
cron-translations / crowdin-pull (push) Has been cancelled

enable testifylint rules disabled in:
https://github.com/go-gitea/gitea/pull/34054
This commit is contained in:
TheFox0x7
2025-03-31 07:53:48 +02:00
committed by GitHub
parent 0fd5392087
commit 0fde8ecd55
262 changed files with 1315 additions and 1365 deletions

View File

@@ -51,11 +51,11 @@ func TestOptionalToJson(t *testing.T) {
t.Run(tc.name, func(t *testing.T) {
b, err := json.Marshal(tc.obj)
assert.NoError(t, err)
assert.EqualValues(t, tc.want, string(b), "gitea json module returned unexpected")
assert.Equal(t, tc.want, string(b), "gitea json module returned unexpected")
b, err = std_json.Marshal(tc.obj)
assert.NoError(t, err)
assert.EqualValues(t, tc.want, string(b), "std json module returned unexpected")
assert.Equal(t, tc.want, string(b), "std json module returned unexpected")
})
}
}
@@ -89,12 +89,12 @@ func TestOptionalFromJson(t *testing.T) {
var obj1 testSerializationStruct
err := json.Unmarshal([]byte(tc.data), &obj1)
assert.NoError(t, err)
assert.EqualValues(t, tc.want, obj1, "gitea json module returned unexpected")
assert.Equal(t, tc.want, obj1, "gitea json module returned unexpected")
var obj2 testSerializationStruct
err = std_json.Unmarshal([]byte(tc.data), &obj2)
assert.NoError(t, err)
assert.EqualValues(t, tc.want, obj2, "std json module returned unexpected")
assert.Equal(t, tc.want, obj2, "std json module returned unexpected")
})
}
}
@@ -135,7 +135,7 @@ optional_two_string: null
t.Run(tc.name, func(t *testing.T) {
b, err := yaml.Marshal(tc.obj)
assert.NoError(t, err)
assert.EqualValues(t, tc.want, string(b), "yaml module returned unexpected")
assert.Equal(t, tc.want, string(b), "yaml module returned unexpected")
})
}
}
@@ -184,7 +184,7 @@ optional_twostring: null
var obj testSerializationStruct
err := yaml.Unmarshal([]byte(tc.data), &obj)
assert.NoError(t, err)
assert.EqualValues(t, tc.want, obj, "yaml module returned unexpected")
assert.Equal(t, tc.want, obj, "yaml module returned unexpected")
})
}
}