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

Function TestBuildSleepTimeout

command/build_timeout_test.go:49–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestBuildSleepTimeout(t *testing.T) {
50 defer cleanup()
51
52 c := &BuildCommand{
53 Meta: testMetaSleepFile(t),
54 }
55
56 args := []string{
57 filepath.Join(testFixture("timeout"), "template.json"),
58 }
59
60 defer cleanup()
61
62 if code := c.Run(args); code == 0 {
63 fatalCommand(t, c.Meta)
64 }
65
66 for _, f := range []string{"roses.txt", "fuchsias.txt", "lilas.txt"} {
67 if !fileExists(f) {
68 t.Errorf("Expected to find %s", f)
69 }
70 }
71
72 for _, f := range []string{"campanules.txt"} {
73 if fileExists(f) {
74 t.Errorf("Expected to not find %s", f)
75 }
76 }
77}

Callers

nothing calls this directly

Calls 7

RunMethod · 0.95
cleanupFunction · 0.85
testMetaSleepFileFunction · 0.85
testFixtureFunction · 0.85
fatalCommandFunction · 0.85
fileExistsFunction · 0.70
ErrorfMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…