@@ -79,29 +79,29 @@ func testGit(t *testing.T, u *url.URL) {
7979
8080t .Run ("SizeLimit" , func (t * testing.T ) {
8181t .Run ("Under" , func (t * testing.T ) {
82- PrintCurrentTest (t )
82+ tests . PrintCurrentTest (t )
8383doCommitAndPush (t , littleSize , dstPath , "data-file-" )
8484})
8585t .Run ("Over" , func (t * testing.T ) {
86- PrintCurrentTest (t )
86+ tests . PrintCurrentTest (t )
8787doAPISetRepoSizeLimit (forkedUserCtx , forkedUserCtx .Username , forkedUserCtx .Reponame , littleSize )
8888doCommitAndPushWithExpectedError (t , bigSize , dstPath , "data-file-" )
8989})
9090t .Run ("UnderAfterResize" , func (t * testing.T ) {
91- PrintCurrentTest (t )
91+ tests . PrintCurrentTest (t )
9292doAPISetRepoSizeLimit (forkedUserCtx , forkedUserCtx .Username , forkedUserCtx .Reponame , bigSize * 10 )
9393doCommitAndPush (t , littleSize , dstPath , "data-file-" )
9494})
9595t .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})
106106t .Run ("CreateAgitFlowPull" , doCreateAgitFlowPull (dstPath , & httpContext , "master" , "test/head" ))
107107t .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 {
325325name , err := generateCommitWithNewData (size , repoPath , "user2@example.com" , "User Two" , prefix )
326326assert .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
328328assert .Error (t , err )
329329return name
330330}
0 commit comments