예제 #1
0
// 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
}
예제 #2
0
// 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
}
예제 #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
}