mirror of https://github.com/hashicorp/packer
move provisioner acceptance tests into sdk alongside builder acceptance tests. Reorganize slightly to make sure no import cycles of doom get formed
parent
becf7723e6
commit
8f51a8bfae
@ -0,0 +1,18 @@
|
||||
package testutils
|
||||
|
||||
import "os"
|
||||
|
||||
// CleanupFiles removes all files in the given strings.
|
||||
func CleanupFiles(moreFiles ...string) {
|
||||
for _, file := range moreFiles {
|
||||
os.RemoveAll(file)
|
||||
}
|
||||
}
|
||||
|
||||
// FileExists returns true if the filename is found.
|
||||
func FileExists(filename string) bool {
|
||||
if _, err := os.Stat(filename); err == nil {
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
Loading…
Reference in new issue