diff options
Diffstat (limited to 'internal/db/backup_test.go')
-rw-r--r-- | internal/db/backup_test.go | 47 |
1 files changed, 44 insertions, 3 deletions
diff --git a/internal/db/backup_test.go b/internal/db/backup_test.go index 1221dac3..b79d455c 100644 --- a/internal/db/backup_test.go +++ b/internal/db/backup_test.go @@ -29,11 +29,10 @@ func TestDumpAndImport(t *testing.T) { if testing.Short() { t.Skip() } - t.Parallel() - if len(Tables) != 4 { - t.Fatalf("New table has added (want 4 got %d), please add new tests for the table and update this check", len(Tables)) + if len(Tables) != 5 { + t.Fatalf("New table has added (want 5 got %d), please add new tests for the table and update this check", len(Tables)) } db := dbtest.NewDB(t, "dumpAndImport", Tables...) @@ -90,6 +89,48 @@ func setupDBToDump(t *testing.T, db *gorm.DB) { CreatedUnix: 1588568886, }, + &Action{ + ID: 1, + UserID: 1, + OpType: ActionCreateBranch, + ActUserID: 1, + ActUserName: "alice", + RepoID: 1, + RepoUserName: "alice", + RepoName: "example", + RefName: "main", + IsPrivate: false, + Content: `{"Len":1,"Commits":[],"CompareURL":""}`, + CreatedUnix: 1588568886, + }, + &Action{ + ID: 2, + UserID: 1, + OpType: ActionCommitRepo, + ActUserID: 1, + ActUserName: "alice", + RepoID: 1, + RepoUserName: "alice", + RepoName: "example", + RefName: "main", + IsPrivate: false, + Content: `{"Len":1,"Commits":[],"CompareURL":""}`, + CreatedUnix: 1588568886, + }, + &Action{ + ID: 3, + UserID: 1, + OpType: ActionDeleteBranch, + ActUserID: 1, + ActUserName: "alice", + RepoID: 1, + RepoUserName: "alice", + RepoName: "example", + RefName: "main", + IsPrivate: false, + CreatedUnix: 1588568886, + }, + &LFSObject{ RepoID: 1, OID: "ef797c8118f02dfb649607dd5d3f8c7623048c9c063d532cc95c5ed7a898a64f", |