mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-16 02:58:14 +02:00
[#1267] call app.Bootstrap() before cobra commands execution
This commit is contained in:
1 parent
8e582acbee
commit
c25e67e13d
6 files changed
+189
-20
No files matched your search
@@ -53,11 +53,19 @@ func TestBaseAppBootstrap(t *testing.T) {
|
||||
})
|
||||
defer app.ResetBootstrapState()
|
||||
|
||||
if app.IsBootstrapped() {
|
||||
t.Fatal("Didn't expect the application to be bootstrapped.")
|
||||
}
|
||||
|
||||
// bootstrap
|
||||
if err := app.Bootstrap(); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
if !app.IsBootstrapped() {
|
||||
t.Fatal("Expected the application to be bootstrapped.")
|
||||
}
|
||||
|
||||
if stat, err := os.Stat(testDataDir); err != nil || !stat.IsDir() {
|
||||
t.Fatal("Expected test data directory to be created.")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user