NewTestApp creates and initializes a test application instance. It is the caller's responsibility to call app.Cleanup() when the app is no longer needed.
(optTestDataDir ...string)
| 72 | // |
| 73 | // It is the caller's responsibility to call app.Cleanup() when the app is no longer needed. |
| 74 | func NewTestApp(optTestDataDir ...string) (*TestApp, error) { |
| 75 | var testDataDir string |
| 76 | if len(optTestDataDir) > 0 { |
| 77 | testDataDir = optTestDataDir[0] |
| 78 | } |
| 79 | |
| 80 | return NewTestAppWithConfig(core.BaseAppConfig{ |
| 81 | DataDir: testDataDir, |
| 82 | EncryptionEnv: "pb_test_env", |
| 83 | }) |
| 84 | } |
| 85 | |
| 86 | // NewTestAppWithConfig creates and initializes a test application instance |
| 87 | // from the provided config. |
searching dependent graphs…