feat: Add tests for the repository picking behaviour
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2024-01-06 14:47:47 +01:00
parent 3692168346
commit 493758f56f
9 changed files with 555 additions and 105 deletions

View File

@@ -9,7 +9,6 @@ import (
"git.polynom.me/rio/internal/dns"
"git.polynom.me/rio/internal/repo"
"code.gitea.io/sdk/gitea"
"github.com/go-acme/lego/v4/lego"
log "github.com/sirupsen/logrus"
@@ -62,7 +61,7 @@ func getDomainKey(domain, pagesDomain string) string {
return domain
}
func MakeTlsConfig(pagesDomain, cachePath string, cache *certificates.CertificatesCache, acmeClient *lego.Client, giteaClient *gitea.Client) *tls.Config {
func MakeTlsConfig(pagesDomain, cachePath string, cache *certificates.CertificatesCache, acmeClient *lego.Client, giteaClient *repo.GiteaClient) *tls.Config {
return &tls.Config{
GetCertificate: func(info *tls.ClientHelloInfo) (*tls.Certificate, error) {
// Validate that we should even care about this domain