Group configuration by component ownership
This commit is contained in:
parent
48a5b8a433
commit
67cc0cb802
1 changed files with 486 additions and 258 deletions
|
|
@ -6,47 +6,67 @@ import Nuthatch.Config
|
|||
|
||||
testConfig :: Config
|
||||
testConfig = Config
|
||||
{ cfgListenHost = "127.0.0.1"
|
||||
, cfgListenPort = 8080
|
||||
, cfgTlsCertPath = "/tls/tls.crt"
|
||||
, cfgTlsKeyPath = "/tls/tls.key"
|
||||
, cfgPublicBaseUrl = "https://nuthatch.example"
|
||||
, cfgJwtSecret = secret "unit-test-session-secret-material-32"
|
||||
, cfgSessionHours = 1
|
||||
, cfgCookieName = "nuthatch_session"
|
||||
, cfgCsrfCookieName = "nuthatch_csrf"
|
||||
, cfgOidcTransactionCookieName = "nuthatch_oidc"
|
||||
, cfgOidcIssuer = "https://issuer.example"
|
||||
, cfgOidcClientId = "nuthatch"
|
||||
, cfgOidcAdditionalAudiences = []
|
||||
, cfgOidcClientSecret = secret "unit-test-client-secret"
|
||||
, cfgOidcRedirectUri = "https://nuthatch.example/oidc/callback"
|
||||
, cfgOidcTransactionMinutes = 5
|
||||
, cfgOidcMaxIdTokenSeconds = 3600
|
||||
, cfgPgConn = secret ""
|
||||
, cfgRedisHost = ""
|
||||
, cfgRedisPort = 6379
|
||||
, cfgRedisDb = 0
|
||||
, cfgS3Endpoint = "https://s3.example"
|
||||
, cfgS3Region = "test"
|
||||
, cfgS3Bucket = "test"
|
||||
, cfgS3AccessKey = secret "test"
|
||||
, cfgS3SecretKey = secret "test"
|
||||
, cfgS3PathStyle = True
|
||||
, cfgPersonalQuotaBytes = 1024
|
||||
, cfgSharedQuotaBytes = 1024
|
||||
, cfgMaxObjectBytes = 1024
|
||||
, cfgThrottleBytesPerSec = 1024
|
||||
, cfgThrottleBurstBytes = 1024
|
||||
, cfgListCacheTtlSec = 30
|
||||
, cfgBrowsePageSize = 100
|
||||
, cfgSearchMaxKeys = 100
|
||||
, cfgSearchTimeoutMs = 1000
|
||||
, cfgDeletePageSize = 100
|
||||
, cfgRecoveryGraceSec = 30
|
||||
, cfgIdempotencyWindowSec = 3600
|
||||
, cfgObjectRequestTimeoutSec = 300
|
||||
, cfgStartupAttempts = 3
|
||||
, cfgStartupDelayMs = 10
|
||||
, cfgAuditObjectKeys = False
|
||||
{ cfgRuntime = RuntimeConfig
|
||||
{ cfgStartupAttempts = 3
|
||||
, cfgStartupDelayMs = 10
|
||||
}
|
||||
, cfgHttp = HttpConfig
|
||||
{ cfgListenHost = "127.0.0.1"
|
||||
, cfgListenPort = 8080
|
||||
, cfgTlsCertPath = "/tls/tls.crt"
|
||||
, cfgTlsKeyPath = "/tls/tls.key"
|
||||
, cfgPublicBaseUrl = "https://nuthatch.example"
|
||||
, cfgJwtSecret = sessionSecret
|
||||
, cfgSessionHours = 1
|
||||
, cfgCookieName = "nuthatch_session"
|
||||
, cfgCsrfCookieName = "nuthatch_csrf"
|
||||
, cfgOidcTransactionCookieName = "nuthatch_oidc"
|
||||
}
|
||||
, cfgOidc = OidcConfig
|
||||
{ cfgOidcIssuer = "https://issuer.example"
|
||||
, cfgOidcClientId = "nuthatch"
|
||||
, cfgOidcAdditionalAudiences = []
|
||||
, cfgOidcClientSecret = secret "unit-test-client-secret"
|
||||
, cfgOidcRedirectUri = "https://nuthatch.example/oidc/callback"
|
||||
, cfgOidcTransactionMinutes = 5
|
||||
, cfgOidcMaxIdTokenSeconds = 3600
|
||||
, cfgOidcTransactionSecret = sessionSecret
|
||||
}
|
||||
, cfgPostgres = PostgresConfig
|
||||
{ cfgPgConn = secret ""
|
||||
}
|
||||
, cfgRedis = RedisConfig
|
||||
{ cfgRedisHost = ""
|
||||
, cfgRedisPort = 6379
|
||||
, cfgRedisDb = 0
|
||||
, cfgThrottleBytesPerSec = 1024
|
||||
, cfgThrottleBurstBytes = 1024
|
||||
}
|
||||
, cfgS3 = S3Config
|
||||
{ cfgS3Endpoint = "https://s3.example"
|
||||
, cfgS3Region = "test"
|
||||
, cfgS3Bucket = "test"
|
||||
, cfgS3AccessKey = secret "test"
|
||||
, cfgS3SecretKey = secret "test"
|
||||
, cfgS3PathStyle = True
|
||||
, cfgS3RequestTimeoutSec = 300
|
||||
}
|
||||
, cfgProduct = ProductConfig
|
||||
{ cfgPersonalQuotaBytes = 1024
|
||||
, cfgSharedQuotaBytes = 1024
|
||||
, cfgMaxObjectBytes = 1024
|
||||
, cfgListCacheTtlSec = 30
|
||||
, cfgBrowsePageSize = 100
|
||||
, cfgSearchMaxKeys = 100
|
||||
, cfgSearchTimeoutMs = 1000
|
||||
, cfgDeletePageSize = 100
|
||||
, cfgIdempotencyWindowSec = 3600
|
||||
, cfgAuditObjectKeys = False
|
||||
}
|
||||
, cfgRecovery = RecoveryConfig
|
||||
{ cfgRecoveryGraceSec = 30
|
||||
, cfgObjectRequestTimeoutSec = 300
|
||||
}
|
||||
}
|
||||
where
|
||||
sessionSecret = secret "unit-test-session-secret-material-32"
|
||||
|
|
|
|||
Loading…
Reference in a new issue