(t *testing.T)
| 672 | } |
| 673 | |
| 674 | func TestPrecondition(t *testing.T) { |
| 675 | t.Parallel() |
| 676 | const dir = "testdata/precondition" |
| 677 | NewExecutorTest(t, |
| 678 | WithName("a precondition has been met"), |
| 679 | WithExecutorOptions( |
| 680 | task.WithDir(dir), |
| 681 | ), |
| 682 | WithTask("foo"), |
| 683 | ) |
| 684 | NewExecutorTest(t, |
| 685 | WithName("a precondition was not met"), |
| 686 | WithExecutorOptions( |
| 687 | task.WithDir(dir), |
| 688 | ), |
| 689 | WithTask("impossible"), |
| 690 | WithRunError(), |
| 691 | ) |
| 692 | NewExecutorTest(t, |
| 693 | WithName("precondition in dependency fails the task"), |
| 694 | WithExecutorOptions( |
| 695 | task.WithDir(dir), |
| 696 | ), |
| 697 | WithTask("depends_on_impossible"), |
| 698 | WithRunError(), |
| 699 | ) |
| 700 | NewExecutorTest(t, |
| 701 | WithName("precondition in cmd fails the task"), |
| 702 | WithExecutorOptions( |
| 703 | task.WithDir(dir), |
| 704 | ), |
| 705 | WithTask("executes_failing_task_as_cmd"), |
| 706 | WithRunError(), |
| 707 | ) |
| 708 | } |
| 709 | |
| 710 | func TestAlias(t *testing.T) { |
| 711 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…