From 871d3ece904da90a5c33783bb59f65dce4e1693a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 16 May 2025 18:51:03 +0800 Subject: [PATCH] fix: test case --- .../providers/ratpanel-console/ratpanel_console_test.go | 6 +++--- .../deployer/providers/ratpanel-site/ratpanel_site_test.go | 4 ++-- internal/pkg/sdk3rd/ratpanel/api.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go b/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go index 6303aa25..40804f87 100644 --- a/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go +++ b/internal/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go @@ -32,12 +32,12 @@ func init() { /* Shell command to run this test: - go test -v ./baotapanel_console_test.go -args \ + go test -v ./ratpanel_console_test.go -args \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_INPUTKEYPATH="/path/to/your-input-key.pem" \ --CERTIMATE_DEPLOYER_RATPANELCONSOLE_APIURL="http://127.0.0.1:8888" \ - --CERTIMATE_DEPLOYER_RATPANELSITE_TOKENID="your-access-token-id" \ - --CERTIMATE_DEPLOYER_RATPANELSITE_TOKEN="your-access-token" \ + --CERTIMATE_DEPLOYER_RATPANELCONSOLE_TOKENID=your-access-token-id \ + --CERTIMATE_DEPLOYER_RATPANELCONSOLE_TOKEN="your-access-token" */ func TestDeploy(t *testing.T) { flag.Parse() diff --git a/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go b/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go index 86c22e1e..a4cab040 100644 --- a/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go +++ b/internal/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go @@ -34,11 +34,11 @@ func init() { /* Shell command to run this test: - go test -v ./baotapanel_site_test.go -args \ + go test -v ./ratpanel_site_test.go -args \ --CERTIMATE_DEPLOYER_RATPANELSITE_INPUTCERTPATH="/path/to/your-input-cert.pem" \ --CERTIMATE_DEPLOYER_RATPANELSITE_INPUTKEYPATH="/path/to/your-input-key.pem" \ --CERTIMATE_DEPLOYER_RATPANELSITE_APIURL="http://127.0.0.1:8888" \ - --CERTIMATE_DEPLOYER_RATPANELSITE_TOKENID="your-access-token-id" \ + --CERTIMATE_DEPLOYER_RATPANELSITE_TOKENID=your-access-token-id \ --CERTIMATE_DEPLOYER_RATPANELSITE_TOKEN="your-access-token" \ --CERTIMATE_DEPLOYER_RATPANELSITE_SITENAME="your-site-name" */ diff --git a/internal/pkg/sdk3rd/ratpanel/api.go b/internal/pkg/sdk3rd/ratpanel/api.go index a2f15153..17f8110f 100644 --- a/internal/pkg/sdk3rd/ratpanel/api.go +++ b/internal/pkg/sdk3rd/ratpanel/api.go @@ -8,8 +8,8 @@ func (c *Client) SettingCert(req *SettingCertRequest) (*SettingCertResponse, err return resp, err } -func (c *Client) WebsiteCert(req *SiteCertRequest) (*SiteCertResponse, error) { - resp := &SiteCertResponse{} +func (c *Client) WebsiteCert(req *WebsiteCertRequest) (*WebsiteCertResponse, error) { + resp := &WebsiteCertResponse{} err := c.sendRequestWithResult(http.MethodPost, "/website/cert", req, resp) return resp, err }