MCPcopy
hub / github.com/hashicorp/packer / fatalCommand

Function fatalCommand

command/command_test.go:18–26  ·  view source on GitHub ↗
(t *testing.T, m Meta)

Source from the content-addressed store, hash-verified

16const fixturesDir = "./test-fixtures"
17
18func fatalCommand(t *testing.T, m Meta) {
19 ui := m.Ui.(*packersdk.BasicUi)
20 out := ui.Writer.(*bytes.Buffer)
21 err := ui.ErrorWriter.(*bytes.Buffer)
22 t.Fatalf(
23 "Bad exit code.\n\nStdout:\n\n%s\n\nStderr:\n\n%s",
24 out.String(),
25 err.String())
26}
27
28func testFixtureContent(n ...string) string {
29 path := filepath.Join(append([]string{fixturesDir}, n...)...)

Callers 15

TestFixFunction · 0.85
TestFix_invalidTemplateFunction · 0.85
TestFmtFunction · 0.85
TestBuildSleepTimeoutFunction · 0.85
TestBuildParallel_1Function · 0.85
TestBuildParallel_2Function · 0.85
TestValidateCommandFunction · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…