Finish renaming the dns table, sort string slices in tests

This commit is contained in:
Melon 2023-07-10 18:00:51 +01:00
parent d6927cd822
commit 5f70d07f90
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
2 changed files with 5 additions and 2 deletions

View File

@ -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
left outer join dns on cert.dns = dns.id
left outer join dns_acme on cert.dns = dns_acme.id
where cert.active = 1
and (cert.auto_renew = 1 or cert.not_after IS NULL)
and cert.renewing = 0

View File

@ -25,6 +25,7 @@ import (
"os"
"os/exec"
"path/filepath"
"sort"
"sync"
"testing"
"time"
@ -194,6 +195,8 @@ func TestPebbleRenewal(t *testing.T) {
assert.Equal(t, "CERTIFICATE", p.Type)
outCert, err := x509.ParseCertificate(p.Bytes)
assert.NoError(t, err)
sort.Strings(i.domains)
sort.Strings(outCert.DNSNames)
assert.Equal(t, i.domains, outCert.DNSNames)
})
}