tests: remove redundant comparison in repo dump/restore (#18660)

It is a leftover forgotten in https://github.com/go-gitea/gitea/pull/18621

Signed-off-by: singuliere <singuliere@autistici.org>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
singuliere 2022-02-10 03:41:05 +01:00 committed by GitHub
parent e034d3a710
commit bc8e19ece1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -140,15 +140,6 @@ func (c *compareDump) assertEquals(repoBefore, repoAfter *repo_model.Repository)
c.repoAfter = repoAfter c.repoAfter = repoAfter
c.dirAfter = filepath.Join(c.basePath, repoAfter.OwnerName, repoAfter.Name) c.dirAfter = filepath.Join(c.basePath, repoAfter.OwnerName, repoAfter.Name)
for _, filename := range []string{"repo.yml", "label.yml"} {
beforeBytes, err := os.ReadFile(filepath.Join(c.dirBefore, filename))
assert.NoError(c.t, err)
before := c.replaceRepoName(string(beforeBytes))
after, err := os.ReadFile(filepath.Join(c.dirAfter, filename))
assert.NoError(c.t, err)
assert.EqualValues(c.t, before, string(after))
}
// //
// base.Repository // base.Repository
// //