feat: allow production provider bootstrap
This commit is contained in:
@@ -77,6 +77,19 @@ func TestApplicationRejectsInvalidProductionDatabaseConfiguration(t *testing.T)
|
||||
}
|
||||
}
|
||||
|
||||
func TestProductionProviderBootstrapFlagAllowsApplicationComposition(t *testing.T) {
|
||||
app, err := application.New(application.Options{Getenv: applicationEnv(map[string]string{
|
||||
"NODE_ENV": "production",
|
||||
"ZHINIAN_DATA_BACKEND": "postgres",
|
||||
"DATABASE_URL": "postgres://user:password@127.0.0.1:5432/zhinian",
|
||||
"ZHINIAN_ALLOW_UNCONFIGURED_PROVIDERS": "true",
|
||||
})})
|
||||
if err != nil {
|
||||
t.Fatalf("New() with provider bootstrap flag = %v", err)
|
||||
}
|
||||
app.Close()
|
||||
}
|
||||
|
||||
func TestProductionLocalBackendNeverGrantsAnonymousAdministrator(t *testing.T) {
|
||||
app, err := application.New(application.Options{Getenv: applicationEnv(map[string]string{
|
||||
"NODE_ENV": "production",
|
||||
|
||||
Reference in New Issue
Block a user