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

Function TestMetaFile

command/test_utils.go:27–36  ·  view source on GitHub ↗

Utils to use in other tests TestMetaFile creates a Meta object that includes a file builder

(t *testing.T)

Source from the content-addressed store, hash-verified

25
26// TestMetaFile creates a Meta object that includes a file builder
27func TestMetaFile(t *testing.T) Meta {
28 var out, err bytes.Buffer
29 return Meta{
30 CoreConfig: testCoreConfigBuilder(t),
31 Ui: &packersdk.BasicUi{
32 Writer: &out,
33 ErrorWriter: &err,
34 },
35 }
36}
37
38// GetStdoutAndErrFromTestMeta extracts stdout/stderr from a Meta created by TestMetaFile
39func GetStdoutAndErrFromTestMeta(t *testing.T, m Meta) (string, string) {

Calls 1

testCoreConfigBuilderFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…