@@ -79,29 +79,29 @@ func testGit(t *testing.T, u *url.URL) {
79
79
80
80
t .Run ("SizeLimit" , func (t * testing.T ) {
81
81
t .Run ("Under" , func (t * testing.T ) {
82
- PrintCurrentTest (t )
82
+ tests . PrintCurrentTest (t )
83
83
doCommitAndPush (t , littleSize , dstPath , "data-file-" )
84
84
})
85
85
t .Run ("Over" , func (t * testing.T ) {
86
- PrintCurrentTest (t )
86
+ tests . PrintCurrentTest (t )
87
87
doAPISetRepoSizeLimit (forkedUserCtx , forkedUserCtx .Username , forkedUserCtx .Reponame , littleSize )
88
88
doCommitAndPushWithExpectedError (t , bigSize , dstPath , "data-file-" )
89
89
})
90
90
t .Run ("UnderAfterResize" , func (t * testing.T ) {
91
- PrintCurrentTest (t )
91
+ tests . PrintCurrentTest (t )
92
92
doAPISetRepoSizeLimit (forkedUserCtx , forkedUserCtx .Username , forkedUserCtx .Reponame , bigSize * 10 )
93
93
doCommitAndPush (t , littleSize , dstPath , "data-file-" )
94
94
})
95
95
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-")
98
98
})
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
105
105
})
106
106
t .Run ("CreateAgitFlowPull" , doCreateAgitFlowPull (dstPath , & httpContext , "master" , "test/head" ))
107
107
t .Run ("BranchProtectMerge" , doBranchProtectPRMerge (& httpContext , dstPath ))
@@ -324,7 +324,7 @@ func doCommitAndPush(t *testing.T, size int, repoPath, prefix string) string {
324
324
func doCommitAndPushWithExpectedError (t * testing.T , size int , repoPath , prefix string ) string {
325
325
name ,
err := generateCommitWithNewData (
size ,
repoPath ,
"[email protected] " ,
"User Two" ,
prefix )
326
326
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
328
328
assert .Error (t , err )
329
329
return name
330
330
}
0 commit comments