From db20e38cda8709e988afeb3e4c8e21cf8bef6842 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Tue, 23 May 2023 16:47:58 +0300 Subject: [PATCH] updated backups test to ensure that the backups dir is not part of the generated zip --- core/base_backup_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/base_backup_test.go b/core/base_backup_test.go index 073d652f..0b4da323 100644 --- a/core/base_backup_test.go +++ b/core/base_backup_test.go @@ -81,6 +81,12 @@ func TestRestoreBackup(t *testing.T) { app, _ := tests.NewTestApp() defer app.Cleanup() + // create a initial test backup to ensure that there are at least 1 + // backup file and that the generated zip doesn't contain the backups dir + if err := app.CreateBackup(context.Background(), "initial"); err != nil { + t.Fatal("Failed to create test initial backup") + } + // create test backup if err := app.CreateBackup(context.Background(), "test"); err != nil { t.Fatal("Failed to create test backup")