From 0ffb372f056f237968a59fcc4892bf8a84fc2e31 Mon Sep 17 00:00:00 2001 From: GoEdgeLab Date: Thu, 27 Oct 2022 20:12:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=8E=AF=E5=A2=83=E4=B8=8B?= =?UTF-8?q?=E7=94=B3=E8=AF=B7ACME=E8=AF=81=E4=B9=A6=E6=97=B6=E6=89=93?= =?UTF-8?q?=E5=8D=B0=E8=B0=83=E8=AF=95=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/acme/request.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/acme/request.go b/internal/acme/request.go index 58569b99..c57c4cec 100644 --- a/internal/acme/request.go +++ b/internal/acme/request.go @@ -8,6 +8,7 @@ import ( "github.com/go-acme/lego/v4/lego" acmelog "github.com/go-acme/lego/v4/log" "github.com/go-acme/lego/v4/registration" + "github.com/iwind/TeaGo/Tea" "io" "log" ) @@ -139,7 +140,9 @@ func (this *Request) runDNS() (certData []byte, keyData []byte, err error) { func (this *Request) runHTTP() (certData []byte, keyData []byte, err error) { if !this.debug { - acmelog.Logger = log.New(io.Discard, "", log.LstdFlags) + if !Tea.IsTesting() { + acmelog.Logger = log.New(io.Discard, "", log.LstdFlags) + } } if this.task.User == nil {