// TearDown simply deletes everything in the directory.
func (gr *gitRepo) TearDown() error {
	tmpDir, err := volume.RenameDirectory(gr.GetPath(), gr.volName+".deleting~")
	if err != nil {
		return err
	}
	err = os.RemoveAll(tmpDir)
	if err != nil {
		return err
	}
	return nil
}
// TearDown simply deletes everything in the directory.
func (ed *emptyDir) TearDown() error {
	tmpDir, err := volume.RenameDirectory(ed.GetPath(), ed.volName+".deleting~")
	if err != nil {
		return err
	}
	err = os.RemoveAll(tmpDir)
	if err != nil {
		return err
	}
	return nil
}
Beispiel #3
0
func (ed *emptyDir) teardownDefault(dir string) error {
	tmpDir, err := volume.RenameDirectory(dir, ed.volName+".deleting~")
	if err != nil {
		return err
	}
	err = os.RemoveAll(tmpDir)
	if err != nil {
		return err
	}
	return nil
}