Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
| 1 |
package job |
| 2 |
|
| 3 |
import ( |
| 4 |
"testing" |
| 5 |
|
| 6 |
"github.com/isacikgoz/gitbatch/internal/git" |
| 7 |
"github.com/stretchr/testify/require" |
| 8 |
) |
| 9 |
|
| 10 |
func TestStart(t *testing.T) { |
| 11 |
th := git.InitTestRepositoryFromLocal(t) |
| 12 |
defer th.CleanUp(t) |
| 13 |
|
| 14 |
mockJob1 := &Job{ |
| 15 |
JobType: PullJob, |
| 16 |
Repository: th.Repository, |
| 17 |
} |
| 18 |
mockJob2 := &Job{ |
| 19 |
JobType: FetchJob, |
| 20 |
Repository: th.Repository, |
| 21 |
} |
| 22 |
mockJob3 := &Job{ |
| 23 |
JobType: MergeJob, |
| 24 |
Repository: th.Repository, |
| 25 |
} |
| 26 |
|
| 27 |
var tests = []struct { |
| 28 |
input *Job |
| 29 |
}{ |
| 30 |
{mockJob1}, |
| 31 |
{mockJob2}, |
| 32 |
{mockJob3}, |
| 33 |
} |
| 34 |
for _, test := range tests { |
| 35 |
err := test.input.start() |
| 36 |
require.NoError(t, err) |
| 37 |
} |
| 38 |
} |