(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestNewBaseApp(t *testing.T) { |
| 22 | const testDataDir = "./pb_base_app_test_data_dir/" |
| 23 | defer os.RemoveAll(testDataDir) |
| 24 | |
| 25 | app := core.NewBaseApp(core.BaseAppConfig{ |
| 26 | DataDir: testDataDir, |
| 27 | EncryptionEnv: "test_env", |
| 28 | IsDev: true, |
| 29 | }) |
| 30 | |
| 31 | if app.DataDir() != testDataDir { |
| 32 | t.Fatalf("expected DataDir %q, got %q", testDataDir, app.DataDir()) |
| 33 | } |
| 34 | |
| 35 | if app.EncryptionEnv() != "test_env" { |
| 36 | t.Fatalf("expected EncryptionEnv test_env, got %q", app.EncryptionEnv()) |
| 37 | } |
| 38 | |
| 39 | if !app.IsDev() { |
| 40 | t.Fatalf("expected IsDev true, got %v", app.IsDev()) |
| 41 | } |
| 42 | |
| 43 | if app.Store() == nil { |
| 44 | t.Fatal("expected Store to be set, got nil") |
| 45 | } |
| 46 | |
| 47 | if app.Settings() == nil { |
| 48 | t.Fatal("expected Settings to be set, got nil") |
| 49 | } |
| 50 | |
| 51 | if app.SubscriptionsBroker() == nil { |
| 52 | t.Fatal("expected SubscriptionsBroker to be set, got nil") |
| 53 | } |
| 54 | |
| 55 | if app.Cron() == nil { |
| 56 | t.Fatal("expected Cron to be set, got nil") |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func TestBaseAppBootstrap(t *testing.T) { |
| 61 | const testDataDir = "./pb_base_app_test_data_dir/" |
nothing calls this directly
no test coverage detected
searching dependent graphs…