* auto-update: remove the update directory after successful update
This commit is contained in:
@@ -12,20 +12,19 @@ func testDoUpdate(t *testing.T) {
|
||||
pkgURL: "https://github.com/AdguardTeam/AdGuardHome/releases/download/v0.95/AdGuardHome_v0.95_linux_amd64.tar.gz",
|
||||
pkgName: "./AdGuardHome_v0.95_linux_amd64.tar.gz",
|
||||
newVer: "v0.95",
|
||||
updateDir: "./update-v0.95",
|
||||
backupDir: "./backup-v0.94",
|
||||
updateDir: "./agh-update-v0.95",
|
||||
backupDir: "./agh-backup-v0.94",
|
||||
configName: "./AdGuardHome.yaml",
|
||||
updateConfigName: "./update-v0.95/AdGuardHome/AdGuardHome.yaml",
|
||||
updateConfigName: "./agh-update-v0.95/AdGuardHome/AdGuardHome.yaml",
|
||||
curBinName: "./AdGuardHome",
|
||||
bkpBinName: "./backup-v0.94/AdGuardHome",
|
||||
newBinName: "./update-v0.95/AdGuardHome/AdGuardHome",
|
||||
bkpBinName: "./agh-backup-v0.94/AdGuardHome",
|
||||
newBinName: "./agh-update-v0.95/AdGuardHome/AdGuardHome",
|
||||
}
|
||||
e := doUpdate(&u)
|
||||
if e != nil {
|
||||
t.Fatalf("FAILED: %s", e)
|
||||
}
|
||||
os.RemoveAll(u.backupDir)
|
||||
os.RemoveAll(u.updateDir)
|
||||
}
|
||||
|
||||
func testTargzFileUnpack(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user