@@ -23,6 +23,7 @@ import (
2323 "code.gitea.io/gitea/tests"
2424
2525 "github.com/stretchr/testify/assert"
26+ "github.com/stretchr/testify/require"
2627)
2728
2829func withKeyFile (t * testing.T , keyname string , callback func (string )) {
@@ -171,13 +172,13 @@ func doGitCheckoutWriteFileCommit(opts localGitAddCommitOptions) func(*testing.T
171172 return func (t * testing.T ) {
172173 doGitCheckoutBranch (opts .LocalRepoPath , opts .CheckoutBranch )(t )
173174 localFilePath := filepath .Join (opts .LocalRepoPath , opts .TreeFilePath )
174- assert .NoError (t , os .WriteFile (localFilePath , []byte (opts .TreeFileContent ), 0o644 ))
175- assert .NoError (t , git .AddChanges (t .Context (), opts .LocalRepoPath , true ))
175+ require .NoError (t , os .WriteFile (localFilePath , []byte (opts .TreeFileContent ), 0o644 ))
176+ require .NoError (t , git .AddChanges (t .Context (), opts .LocalRepoPath , true ))
176177 signature := git.Signature {
177178178179 Name : "test" ,
179180 }
180- assert .NoError (t , git .CommitChanges (t .Context (), opts .LocalRepoPath , git.CommitChangesOptions {
181+ require .NoError (t , git .CommitChanges (t .Context (), opts .LocalRepoPath , git.CommitChangesOptions {
181182 Committer : & signature ,
182183 Author : & signature ,
183184 Message : fmt .Sprintf ("update %s @ %s" , opts .TreeFilePath , opts .CheckoutBranch ),
0 commit comments