1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Fix yaml test (#27297) (#27303)

Backport #27297 by @lunny

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Giteabot
2023-09-27 15:05:35 +08:00
committed by GitHub
parent 42f7c2ad89
commit 755369df56
2 changed files with 6 additions and 3 deletions

View File

@@ -22,12 +22,13 @@ func TestFixtureGeneration(t *testing.T) {
if !assert.NoError(t, err) {
return
}
bytes, err := os.ReadFile(filepath.Join(unittest.FixturesDir(), name+".yml"))
p := filepath.Join(unittest.FixturesDir(), name+".yml")
bytes, err := os.ReadFile(p)
if !assert.NoError(t, err) {
return
}
data := string(util.NormalizeEOL(bytes))
assert.True(t, data == expected, "Differences detected for %s.yml", name)
assert.EqualValues(t, expected, data, "Differences detected for %s", p)
}
test(GetYamlFixturesAccess, "access")