| 656 | } |
| 657 | |
| 658 | func GetSingleDatabaseCollectionWithUser(ctx context.Context, tb testing.TB, database *Database) (*DatabaseCollectionWithUser, context.Context) { |
| 659 | c := &DatabaseCollectionWithUser{ |
| 660 | DatabaseCollection: GetSingleDatabaseCollection(tb, database.DatabaseContext), |
| 661 | user: database.user, |
| 662 | } |
| 663 | return c, c.AddCollectionContext(ctx) |
| 664 | } |
| 665 | |
| 666 | func GetSingleDatabaseCollection(tb testing.TB, database *DatabaseContext) *DatabaseCollection { |
| 667 | require.Equal(tb, 1, len(database.CollectionByID), fmt.Sprintf("Database must only have a single collection configured has %d", len(database.CollectionByID))) |