SETUP FUNCTIONS
(t *testing.T, fnConfig *FunctionsConfig)
| 637 | //////// SETUP FUNCTIONS |
| 638 | |
| 639 | func setupTestDBWithFunctions(t *testing.T, fnConfig *FunctionsConfig) (*db.Database, context.Context) { |
| 640 | cacheOptions := db.DefaultCacheOptions() |
| 641 | options := db.DatabaseContextOptions{ |
| 642 | CacheOptions: &cacheOptions, |
| 643 | Scopes: db.GetScopesOptionsDefaultCollectionOnly(t), |
| 644 | } |
| 645 | var err error |
| 646 | if fnConfig != nil { |
| 647 | options.UserFunctions, err = CompileFunctions(base.TestCtx(t), *fnConfig) |
| 648 | assert.NoError(t, err) |
| 649 | } |
| 650 | return db.SetupTestDBWithOptions(t, options) |
| 651 | } |
no test coverage detected