MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestResolveEffectiveConfigFlightIngressDurationsFromFile

Function TestResolveEffectiveConfigFlightIngressDurationsFromFile

main_test.go:706–728  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

704 if resolved.Server.ACMECacheDir != "/cli/acme-cache" {
705 t.Fatalf("expected ACME cache dir from CLI, got %q", resolved.Server.ACMECacheDir)
706 }
707}
708
709func TestResolveEffectiveConfigACMEEnvOnly(t *testing.T) {
710 // No file config, just env vars
711 env := map[string]string{
712 "DUCKGRES_ACME_DOMAIN": "envonly.us.duckgres.com",
713 "DUCKGRES_ACME_EMAIL": "test@example.com",
714 }
715 resolved := configresolve.ResolveEffective(nil, configresolve.CLIInputs{}, envFromMap(env), nil)
716 if resolved.Server.ACMEDomain != "envonly.us.duckgres.com" {
717 t.Fatalf("expected ACME domain from env, got %q", resolved.Server.ACMEDomain)
718 }
719 if resolved.Server.ACMEEmail != "test@example.com" {
720 t.Fatalf("expected ACME email from env, got %q", resolved.Server.ACMEEmail)
721 }
722}
723
724func TestResolveEffectiveConfigACMEDNSProviderValidation(t *testing.T) {
725 fileCfg := &FileConfig{
726 TLS: TLSConfig{
727 ACME: ACMEConfig{
728 Domain: "test.us.duckgres.com",
729 DNSProvider: "cloudflare",
730 DNSZoneID: "Z123",
731 },

Callers

nothing calls this directly

Calls 2

ResolveEffectiveFunction · 0.92
envFromMapFunction · 0.85

Tested by

no test coverage detected