add-err-handling-in-images/etcd/migrate

This commit is contained in:
hwdef
2019-09-14 19:12:48 +08:00
parent 07e58a361b
commit 951aa8e69a
2 changed files with 8 additions and 2 deletions

View File

@@ -151,9 +151,12 @@ func TestBackup(t *testing.T) {
func newTestPath(t *testing.T) string {
path, err := ioutil.TempDir("", "etcd-migrate-test-")
os.Chmod(path, 0777)
if err != nil {
t.Fatalf("Failed to create tmp dir for test: %v", err)
}
err = os.Chmod(path, 0777)
if err != nil {
t.Fatalf("Failed to granting permission to tmp dir for test: %v", err)
}
return path
}