revert back to previous file to save logic

This commit is contained in:
Tejal Desai
2020-03-25 09:43:59 -07:00
parent caaf6c8adf
commit 2ea28fc7f5
2 changed files with 21 additions and 15 deletions
+3 -7
View File
@@ -376,8 +376,8 @@ func Test_filesToSave(t *testing.T) {
if err != nil {
t.Errorf("error creating tmpdir: %s", err)
}
defer func () {
config.RootDir = original
defer func() {
config.RootDir = original
os.RemoveAll(tmpDir)
}()
@@ -396,11 +396,7 @@ func Test_filesToSave(t *testing.T) {
fp.Close()
}
args := []string{}
for _, arg := range tt.args {
args = append(args, filepath.Join(tmpDir, arg))
}
got, err := filesToSave(args)
got, err := filesToSave(tt.args)
if err != nil {
t.Errorf("got err: %s", err)
}