mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-04-18 06:22:06 +02:00
updated backups test to ensure that the backups dir is not part of the generated zip
This commit is contained in:
parent
286046e15a
commit
db20e38cda
@ -81,6 +81,12 @@ func TestRestoreBackup(t *testing.T) {
|
|||||||
app, _ := tests.NewTestApp()
|
app, _ := tests.NewTestApp()
|
||||||
defer app.Cleanup()
|
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
|
// create test backup
|
||||||
if err := app.CreateBackup(context.Background(), "test"); err != nil {
|
if err := app.CreateBackup(context.Background(), "test"); err != nil {
|
||||||
t.Fatal("Failed to create test backup")
|
t.Fatal("Failed to create test backup")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user