mirror of
https://github.com/1f349/orchid.git
synced 2024-12-22 08:04:10 +00:00
Finish renaming the dns table, sort string slices in tests
This commit is contained in:
parent
d6927cd822
commit
5f70d07f90
@ -1,6 +1,6 @@
|
|||||||
select cert.id, cert.not_after, dns.type, dns.token, cert.temp_parent
|
select cert.id, cert.not_after, dns_acme.type, dns_acme.token, cert.temp_parent
|
||||||
from certificates as cert
|
from certificates as cert
|
||||||
left outer join dns on cert.dns = dns.id
|
left outer join dns_acme on cert.dns = dns_acme.id
|
||||||
where cert.active = 1
|
where cert.active = 1
|
||||||
and (cert.auto_renew = 1 or cert.not_after IS NULL)
|
and (cert.auto_renew = 1 or cert.not_after IS NULL)
|
||||||
and cert.renewing = 0
|
and cert.renewing = 0
|
||||||
|
@ -25,6 +25,7 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"sort"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
@ -194,6 +195,8 @@ func TestPebbleRenewal(t *testing.T) {
|
|||||||
assert.Equal(t, "CERTIFICATE", p.Type)
|
assert.Equal(t, "CERTIFICATE", p.Type)
|
||||||
outCert, err := x509.ParseCertificate(p.Bytes)
|
outCert, err := x509.ParseCertificate(p.Bytes)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
sort.Strings(i.domains)
|
||||||
|
sort.Strings(outCert.DNSNames)
|
||||||
assert.Equal(t, i.domains, outCert.DNSNames)
|
assert.Equal(t, i.domains, outCert.DNSNames)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user