aboutsummaryrefslogtreecommitdiff
path: root/internal/db/backup_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/db/backup_test.go')
-rw-r--r--internal/db/backup_test.go17
1 files changed, 15 insertions, 2 deletions
diff --git a/internal/db/backup_test.go b/internal/db/backup_test.go
index 27688889..4bbef8f6 100644
--- a/internal/db/backup_test.go
+++ b/internal/db/backup_test.go
@@ -29,8 +29,8 @@ func Test_dumpAndImport(t *testing.T) {
t.Parallel()
- if len(Tables) != 3 {
- t.Fatalf("New table has added (want 3 got %d), please add new tests for the table and update this check", len(Tables))
+ 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))
}
db := initTestDB(t, "dumpAndImport", Tables...)
@@ -46,6 +46,19 @@ func setupDBToDump(t *testing.T, db *gorm.DB) {
t.Helper()
vals := []interface{}{
+ &Access{
+ ID: 1,
+ UserID: 1,
+ RepoID: 11,
+ Mode: AccessModeRead,
+ },
+ &Access{
+ ID: 2,
+ UserID: 2,
+ RepoID: 22,
+ Mode: AccessModeWrite,
+ },
+
&AccessToken{
UserID: 1,
Name: "test1",