mirror of
https://github.com/miniflux/v2.git
synced 2025-08-31 18:31:01 +00:00
Database backed LetsEncrypt certificate cache (#993)
This commit is contained in:
parent
4464802947
commit
0bece2df7d
8 changed files with 78 additions and 57 deletions
|
@ -409,41 +409,6 @@ func TestDefaultCertDomainValue(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestCertCache(t *testing.T) {
|
||||
os.Clearenv()
|
||||
os.Setenv("CERT_CACHE", "foobar")
|
||||
|
||||
parser := NewParser()
|
||||
opts, err := parser.ParseEnvironmentVariables()
|
||||
if err != nil {
|
||||
t.Fatalf(`Parsing failure: %v`, err)
|
||||
}
|
||||
|
||||
expected := "foobar"
|
||||
result := opts.CertCache()
|
||||
|
||||
if result != expected {
|
||||
t.Fatalf(`Unexpected CERT_CACHE value, got %q instead of %q`, result, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDefaultCertCacheValue(t *testing.T) {
|
||||
os.Clearenv()
|
||||
|
||||
parser := NewParser()
|
||||
opts, err := parser.ParseEnvironmentVariables()
|
||||
if err != nil {
|
||||
t.Fatalf(`Parsing failure: %v`, err)
|
||||
}
|
||||
|
||||
expected := defaultCertCache
|
||||
result := opts.CertCache()
|
||||
|
||||
if result != expected {
|
||||
t.Fatalf(`Unexpected CERT_CACHE value, got %q instead of %q`, result, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestDefaultCleanupFrequencyHoursValue(t *testing.T) {
|
||||
os.Clearenv()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue