| 987 | } |
| 988 | |
| 989 | func GitSSHKey(t testing.TB, db database.Store, orig database.GitSSHKey) database.GitSSHKey { |
| 990 | key, err := db.InsertGitSSHKey(genCtx, database.InsertGitSSHKeyParams{ |
| 991 | UserID: takeFirst(orig.UserID, uuid.New()), |
| 992 | CreatedAt: takeFirst(orig.CreatedAt, dbtime.Now()), |
| 993 | UpdatedAt: takeFirst(orig.UpdatedAt, dbtime.Now()), |
| 994 | PrivateKey: takeFirst(orig.PrivateKey, ""), |
| 995 | PublicKey: takeFirst(orig.PublicKey, ""), |
| 996 | }) |
| 997 | require.NoError(t, err, "insert ssh key") |
| 998 | return key |
| 999 | } |
| 1000 | |
| 1001 | func Organization(t testing.TB, db database.Store, orig database.Organization) database.Organization { |
| 1002 | org, err := db.InsertOrganization(genCtx, database.InsertOrganizationParams{ |