@@ -79,29 +79,29 @@ func testGit(t *testing.T, u *url.URL) {
7979
8080 t .Run ("SizeLimit" , func (t * testing.T ) {
8181 t .Run ("Under" , func (t * testing.T ) {
82- PrintCurrentTest (t )
82+ tests . PrintCurrentTest (t )
8383 doCommitAndPush (t , littleSize , dstPath , "data-file-" )
8484 })
8585 t .Run ("Over" , func (t * testing.T ) {
86- PrintCurrentTest (t )
86+ tests . PrintCurrentTest (t )
8787 doAPISetRepoSizeLimit (forkedUserCtx , forkedUserCtx .Username , forkedUserCtx .Reponame , littleSize )
8888 doCommitAndPushWithExpectedError (t , bigSize , dstPath , "data-file-" )
8989 })
9090 t .Run ("UnderAfterResize" , func (t * testing.T ) {
91- PrintCurrentTest (t )
91+ tests . PrintCurrentTest (t )
9292 doAPISetRepoSizeLimit (forkedUserCtx , forkedUserCtx .Username , forkedUserCtx .Reponame , bigSize * 10 )
9393 doCommitAndPush (t , littleSize , dstPath , "data-file-" )
9494 })
9595 t .Run ("Deletion" , func (t * testing.T ) {
96- PrintCurrentTest (t )
97- //TODO doDeleteCommitAndPush(t, littleSize, dstPath, "data-file-")
96+ tests . PrintCurrentTest (t )
97+ // TODO doDeleteCommitAndPush(t, littleSize, dstPath, "data-file-")
9898 })
99- //TODO delete branch
100- //TODO delete tag
101- //TODO add big commit that will be over with the push
102- //TODO add lfs
103- //TODO remove lfs
104- //TODO add missing case
99+ // TODO delete branch
100+ // TODO delete tag
101+ // TODO add big commit that will be over with the push
102+ // TODO add lfs
103+ // TODO remove lfs
104+ // TODO add missing case
105105 })
106106 t .Run ("CreateAgitFlowPull" , doCreateAgitFlowPull (dstPath , & httpContext , "master" , "test/head" ))
107107 t .Run ("BranchProtectMerge" , doBranchProtectPRMerge (& httpContext , dstPath ))
@@ -324,7 +324,7 @@ func doCommitAndPush(t *testing.T, size int, repoPath, prefix string) string {
324324func doCommitAndPushWithExpectedError (t * testing.T , size int , repoPath , prefix string ) string {
325325 name ,
err := generateCommitWithNewData (
size ,
repoPath ,
"[email protected] " ,
"User Two" ,
prefix )
326326 assert .NoError (t , err )
327- _ , err = git .NewCommand ("push" , "origin" , "master" ).RunInDir ( repoPath ) //Push
327+ _ , _ , err = git .NewCommand (git . DefaultContext , "push" , "origin" , "master" ).RunStdString ( & git. RunOpts { Dir : repoPath } ) // Push
328328 assert .Error (t , err )
329329 return name
330330}
0 commit comments