diff --git a/g10k_test.go b/g10k_test.go index 0a80511..74d5fe2 100755 --- a/g10k_test.go +++ b/g10k_test.go @@ -2217,6 +2217,11 @@ func TestPurgeStaleContent(t *testing.T) { defer f.Close() f.WriteString("foobar") f.Sync() + createOrPurgeDir("/tmp/example/single/.resource_types", funcName) + r, _ := os.Create("/tmp/example/single/.resource_types/test.pp") + defer r.Close() + r.WriteString("foobar") + r.Sync() cmd := exec.Command(os.Args[0], "-test.run="+funcName+"$") cmd.Env = append(os.Environ(), "TEST_FOR_CRASH_"+funcName+"=1") @@ -2231,7 +2236,7 @@ func TestPurgeStaleContent(t *testing.T) { if expectedExitCode != exitCode { t.Errorf("terminated with %v, but we expected exit status %v", exitCode, expectedExitCode) } - //fmt.Println(string(out)) + // fmt.Println(string(out)) expectedLines := []string{ "DEBUG checkForStaleContent(): filepath.Walk'ing directory /tmp/example/single", @@ -2259,6 +2264,10 @@ func TestPurgeStaleContent(t *testing.T) { t.Errorf("Missing module file that should be there") } + if !fileExists("/tmp/example/single/.resource_types/test.pp") { + t.Errorf("Missing resource_types file /tmp/example/single/.resource_types/test.pp that should be there") + } + purgeDir(cacheDir, funcName) purgeDir("/tmp/example", funcName) }