mirror of
https://github.com/go-task/task.git
synced 2025-06-15 00:15:10 +02:00
Adding a --concurrency (-C) flag
This commit is contained in:
committed by
Andrey Nering
parent
f0cd7d27fb
commit
c6ecf70377
16
task_test.go
16
task_test.go
@ -171,6 +171,22 @@ func TestVarsInvalidTmpl(t *testing.T) {
|
||||
assert.EqualError(t, e.Run(context.Background(), taskfile.Call{Task: target}), expectError, "e.Run(target)")
|
||||
}
|
||||
|
||||
func TestConcurrency(t *testing.T) {
|
||||
const (
|
||||
dir = "testdata/concurrency"
|
||||
target = "default"
|
||||
)
|
||||
|
||||
e := &task.Executor{
|
||||
Dir: dir,
|
||||
Stdout: ioutil.Discard,
|
||||
Stderr: ioutil.Discard,
|
||||
Concurrency: 1,
|
||||
}
|
||||
assert.NoError(t, e.Setup(), "e.Setup()")
|
||||
assert.NoError(t, e.Run(context.Background(), taskfile.Call{Task: target}), "e.Run(target)")
|
||||
}
|
||||
|
||||
func TestParams(t *testing.T) {
|
||||
tt := fileContentTest{
|
||||
Dir: "testdata/params",
|
||||
|
Reference in New Issue
Block a user