Remove old global config and use new static config
This commit is contained in:
parent
c39d21c178
commit
5d91c7e15c
114 changed files with 2485 additions and 3646 deletions
|
@ -25,10 +25,10 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
domainSafe := &safe.Safe{}
|
||||
domainSafe.Set(domainMap)
|
||||
|
||||
// FIXME Add a test for DefaultCertificate
|
||||
testCases := []struct {
|
||||
desc string
|
||||
dynamicCerts *safe.Safe
|
||||
staticCerts *safe.Safe
|
||||
resolvingDomains map[string]struct{}
|
||||
acmeCertificates []*Certificate
|
||||
domains []string
|
||||
|
@ -45,12 +45,6 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
dynamicCerts: wildcardSafe,
|
||||
expectedDomains: nil,
|
||||
},
|
||||
{
|
||||
desc: "wildcard already exists in static certificates",
|
||||
domains: []string{"*.traefik.wtf"},
|
||||
staticCerts: wildcardSafe,
|
||||
expectedDomains: nil,
|
||||
},
|
||||
{
|
||||
desc: "wildcard already exists in ACME certificates",
|
||||
domains: []string{"*.traefik.wtf"},
|
||||
|
@ -72,12 +66,6 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
dynamicCerts: domainSafe,
|
||||
expectedDomains: []string{"foo.traefik.wtf"},
|
||||
},
|
||||
{
|
||||
desc: "domain CN already exists in static certificates and SANs to generate",
|
||||
domains: []string{"traefik.wtf", "foo.traefik.wtf"},
|
||||
staticCerts: domainSafe,
|
||||
expectedDomains: []string{"foo.traefik.wtf"},
|
||||
},
|
||||
{
|
||||
desc: "domain CN already exists in ACME certificates and SANs to generate",
|
||||
domains: []string{"traefik.wtf", "foo.traefik.wtf"},
|
||||
|
@ -94,12 +82,6 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
dynamicCerts: domainSafe,
|
||||
expectedDomains: nil,
|
||||
},
|
||||
{
|
||||
desc: "domain already exists in static certificates",
|
||||
domains: []string{"traefik.wtf"},
|
||||
staticCerts: domainSafe,
|
||||
expectedDomains: nil,
|
||||
},
|
||||
{
|
||||
desc: "domain already exists in ACME certificates",
|
||||
domains: []string{"traefik.wtf"},
|
||||
|
@ -116,12 +98,6 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
dynamicCerts: wildcardSafe,
|
||||
expectedDomains: nil,
|
||||
},
|
||||
{
|
||||
desc: "domain matched by wildcard in static certificates",
|
||||
domains: []string{"who.traefik.wtf", "foo.traefik.wtf"},
|
||||
staticCerts: wildcardSafe,
|
||||
expectedDomains: nil,
|
||||
},
|
||||
{
|
||||
desc: "domain matched by wildcard in ACME certificates",
|
||||
domains: []string{"who.traefik.wtf", "foo.traefik.wtf"},
|
||||
|
@ -190,7 +166,6 @@ func TestGetUncheckedCertificates(t *testing.T) {
|
|||
acmeProvider := Provider{
|
||||
certificateStore: &traefiktls.CertificateStore{
|
||||
DynamicCerts: test.dynamicCerts,
|
||||
StaticCerts: test.staticCerts,
|
||||
},
|
||||
certificates: test.acmeCertificates,
|
||||
resolvingDomains: test.resolvingDomains,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue