fix: test case

This commit is contained in:
耗子 2025-05-16 18:51:03 +08:00
parent 8014abc836
commit 871d3ece90
No known key found for this signature in database
GPG Key ID: C964D7226D045DAA
3 changed files with 7 additions and 7 deletions

View File

@ -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()

View File

@ -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"
*/

View File

@ -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
}