(t *testing.T, args, present, notPresent []string, expectReturn int)
| 803 | } |
| 804 | |
| 805 | func testHCLOnlyExceptFlags(t *testing.T, args, present, notPresent []string, expectReturn int) { |
| 806 | c := &BuildCommand{ |
| 807 | Meta: TestMetaFile(t), |
| 808 | } |
| 809 | |
| 810 | defer cleanup() |
| 811 | |
| 812 | finalArgs := []string{"-parallel-builds=1"} |
| 813 | finalArgs = append(finalArgs, args...) |
| 814 | finalArgs = append(finalArgs, testFixture("hcl-only-except")) |
| 815 | |
| 816 | if code := c.Run(finalArgs); code != expectReturn { |
| 817 | fatalCommand(t, c.Meta) |
| 818 | } |
| 819 | |
| 820 | for _, f := range notPresent { |
| 821 | if fileExists(f) { |
| 822 | t.Errorf("Expected NOT to find %s", f) |
| 823 | } |
| 824 | } |
| 825 | for _, f := range present { |
| 826 | if !fileExists(f) { |
| 827 | t.Errorf("Expected to find %s", f) |
| 828 | } |
| 829 | } |
| 830 | } |
| 831 | |
| 832 | func TestHCL2PostProcessorForceFlag(t *testing.T) { |
| 833 | t.Helper() |
no test coverage detected
searching dependent graphs…