From 29ab687c1d71929cd0cc81fc502672d7dd4dcb5e Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Sun, 16 Nov 2025 00:43:27 +0800 Subject: [PATCH] test: clean code --- .../certmgr/providers/1panel-ssl/1panel_ssl_test.go | 4 ++-- .../certmgr/providers/aliyun-cas/aliyun_cas_test.go | 4 ++-- .../certmgr/providers/aliyun-slb/aliyun_slb_test.go | 4 ++-- .../providers/azure-keyvault/azure_keyvault_test.go | 4 ++-- .../baiducloud-cert/baiducloud_cert_test.go | 4 ++-- .../providers/ctcccloud-ao/ctcccloud_ao_test.go | 4 ++-- .../providers/ctcccloud-cdn/ctcccloud_cdn_test.go | 4 ++-- .../providers/ctcccloud-cms/ctcccloud_cms_test.go | 4 ++-- .../providers/ctcccloud-elb/ctcccloud_elb_test.go | 4 ++-- .../providers/ctcccloud-icdn/ctcccloud_icdn_test.go | 4 ++-- .../providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go | 4 ++-- .../providers/jdcloud-ssl/jdcloud_ssl_test.go | 4 ++-- .../providers/qiniu-sslcert/qiniu_sslcert_test.go | 4 ++-- .../rainyun-sslcenter/rainyun_sslcenter_test.go | 4 ++-- .../tencentcloud-ssl/tencentcloud_ssl_test.go | 4 ++-- .../providers/ucloud-ussl/ucloud_ussl_test.go | 4 ++-- .../certmgr/providers/upyun-ssl/upyun_ssl_test.go | 4 ++-- .../volcengine_certcenter_test.go | 4 ++-- .../wangsu-certificate/wangsu_certificate_test.go | 4 ++-- .../providers/1panel-console/1panel_console_test.go | 4 ++-- .../providers/1panel-site/1panel_site_test.go | 4 ++-- .../deployer/providers/aliyun-alb/aliyun_alb_test.go | 8 ++++---- .../providers/aliyun-apigw/aliyun_apigw_test.go | 4 ++-- .../deployer/providers/aliyun-cdn/aliyun_cdn_test.go | 4 ++-- .../deployer/providers/aliyun-clb/aliyun_clb_test.go | 8 ++++---- .../providers/aliyun-dcdn/aliyun_dcdn_test.go | 4 ++-- .../providers/aliyun-ddospro/aliyun_ddospro_test.go | 4 ++-- .../deployer/providers/aliyun-esa/aliyun_esa_test.go | 4 ++-- .../deployer/providers/aliyun-fc/aliyun_fc_test.go | 4 ++-- .../deployer/providers/aliyun-ga/aliyun_ga_test.go | 8 ++++---- .../providers/aliyun-live/aliyun_live_test.go | 4 ++-- .../deployer/providers/aliyun-nlb/aliyun_nlb_test.go | 8 ++++---- .../deployer/providers/aliyun-oss/aliyun_oss_test.go | 4 ++-- .../deployer/providers/aliyun-vod/aliyun_vod_test.go | 4 ++-- .../deployer/providers/aliyun-waf/aliyun_waf_test.go | 4 ++-- pkg/core/deployer/providers/apisix/apisix_test.go | 4 ++-- .../providers/aws-cloudfront/aws_cloudfront_test.go | 4 ++-- .../baiducloud-appblb/baiducloud_appblb_test.go | 4 ++-- .../providers/baiducloud-blb/baiducloud_blb_test.go | 4 ++-- .../providers/baiducloud-cdn/baiducloud_cdn_test.go | 4 ++-- .../providers/baishan-cdn/baishan_cdn_test.go | 4 ++-- .../baotapanel-console/baotapanel_console_test.go | 4 ++-- .../baotapanel-site/baotapanel_site_test.go | 4 ++-- .../baotapanelgo_console_test.go | 4 ++-- .../baotapanelgo-site/baotapanelgo_site_test.go | 4 ++-- .../baotawaf-console/baotawaf_console_test.go | 4 ++-- .../providers/baotawaf-site/baotawaf_site_test.go | 4 ++-- .../deployer/providers/bunny-cdn/bunny_cdn_test.go | 4 ++-- .../providers/byteplus-cdn/byteplus_cdn_test.go | 4 ++-- .../deployer/providers/cachefly/cachefly_test.go | 4 ++-- pkg/core/deployer/providers/cdnfly/cdnfly_test.go | 4 ++-- .../providers/ctcccloud-ao/ctcccloud_ao_test.go | 4 ++-- .../providers/ctcccloud-cdn/ctcccloud_cdn_test.go | 4 ++-- .../providers/ctcccloud-cms/ctcccloud_cms_test.go | 4 ++-- .../providers/ctcccloud-elb/ctcccloud_elb_test.go | 8 ++++---- .../providers/ctcccloud-icdn/ctcccloud_icdn_test.go | 4 ++-- .../providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go | 4 ++-- .../providers/dogecloud-cdn/dogecloud_cdn_test.go | 4 ++-- pkg/core/deployer/providers/flexcdn/flexcdn_test.go | 4 ++-- .../deployer/providers/gcore-cdn/gcore_cdn_test.go | 4 ++-- pkg/core/deployer/providers/goedge/goedge_test.go | 4 ++-- .../huaweicloud-cdn/huaweicloud_cdn_test.go | 4 ++-- .../huaweicloud-elb/huaweicloud_elb_test.go | 12 ++++++------ .../huaweicloud-obs/huaweicloud_obs_test.go | 4 ++-- .../huaweicloud-waf/huaweicloud_waf_test.go | 4 ++-- .../providers/jdcloud-alb/jdcloud_alb_test.go | 8 ++++---- .../providers/jdcloud-cdn/jdcloud_cdn_test.go | 4 ++-- .../providers/jdcloud-live/jdcloud_live_test.go | 4 ++-- .../providers/jdcloud-vod/jdcloud_vod_test.go | 4 ++-- .../deployer/providers/k8s-secret/k8s_secret_test.go | 4 ++-- pkg/core/deployer/providers/kong/kong_test.go | 4 ++-- .../deployer/providers/ksyun-cdn/ksyun_cdn_test.go | 4 ++-- pkg/core/deployer/providers/lecdn/lecdn_test.go | 4 ++-- pkg/core/deployer/providers/local/local_test.go | 12 ++++++------ .../providers/netlify-site/netlify_site_test.go | 4 ++-- .../deployer/providers/proxmoxve/proxmoxve_test.go | 4 ++-- .../deployer/providers/qiniu-cdn/qiniu_cdn_test.go | 4 ++-- .../deployer/providers/qiniu-kodo/qiniu_kodo_test.go | 4 ++-- .../deployer/providers/qiniu-pili/qiniu_pili_test.go | 4 ++-- .../providers/rainyun-rcdn/rainyun_rcdn_test.go | 4 ++-- .../ratpanel-console/ratpanel_console_test.go | 4 ++-- .../providers/ratpanel-site/ratpanel_site_test.go | 4 ++-- .../deployer/providers/safeline/safeline_test.go | 4 ++-- pkg/core/deployer/providers/ssh/ssh_test.go | 4 ++-- .../tencentcloud-cdn/tencentcloud_cdn_test.go | 4 ++-- .../tencentcloud-clb/tencentcloud_clb_test.go | 12 ++++++------ .../tencentcloud-cos/tencentcloud_cos_test.go | 4 ++-- .../tencentcloud-css/tencentcloud_css_test.go | 4 ++-- .../tencentcloud-ecdn/tencentcloud_ecdn_test.go | 4 ++-- .../tencentcloud-eo/tencentcloud_eo_test.go | 4 ++-- .../tencentcloud-gaap/tencentcloud_gaap_test.go | 4 ++-- .../tencentcloud-scf/tencentcloud_scf_test.go | 4 ++-- .../tencentcloud-vod/tencentcloud_vod_test.go | 4 ++-- .../tencentcloud-waf/tencentcloud_waf_test.go | 4 ++-- .../providers/ucloud-ucdn/ucloud_ucdn_test.go | 4 ++-- .../deployer/providers/ucloud-us3/ucloud_us3_test.go | 4 ++-- .../unicloud-webhost/unicloud_webhost_test.go | 4 ++-- .../deployer/providers/upyun-cdn/upyun_cdn_test.go | 4 ++-- .../deployer/providers/upyun-file/upyun_file_test.go | 4 ++-- .../providers/volcengine-alb/volcengine_alb_test.go | 4 ++-- .../providers/volcengine-cdn/volcengine_cdn_test.go | 4 ++-- .../providers/volcengine-clb/volcengine_clb_test.go | 4 ++-- .../volcengine-dcdn/volcengine_dcdn_test.go | 4 ++-- .../volcengine-imagex/volcengine_imagex_test.go | 4 ++-- .../volcengine-live/volcengine_live_test.go | 4 ++-- .../providers/volcengine-tos/volcengine_tos_test.go | 4 ++-- .../deployer/providers/wangsu-cdn/wangsu_cdn_test.go | 4 ++-- .../providers/wangsu-cdnpro/wangsu_cdnpro_test.go | 4 ++-- .../wangsu-certificate/wangsu_certificate_test.go | 4 ++-- pkg/core/deployer/providers/webhook/webhook_test.go | 4 ++-- .../providers/dingtalkbot/dingtalkbot_test.go | 4 ++-- .../notifier/providers/discordbot/discordbot_test.go | 4 ++-- pkg/core/notifier/providers/email/email_test.go | 4 ++-- pkg/core/notifier/providers/larkbot/larkbot_test.go | 4 ++-- .../notifier/providers/mattermost/mattermost_test.go | 4 ++-- .../notifier/providers/slackbot/slackbot_test.go | 4 ++-- .../providers/telegrambot/telegrambot_test.go | 4 ++-- pkg/core/notifier/providers/webhook/webhook_test.go | 4 ++-- .../notifier/providers/wecombot/wecombot_test.go | 4 ++-- 119 files changed, 262 insertions(+), 262 deletions(-) diff --git a/pkg/core/certmgr/providers/1panel-ssl/1panel_ssl_test.go b/pkg/core/certmgr/providers/1panel-ssl/1panel_ssl_test.go index 807b611e1..e512f3362 100644 --- a/pkg/core/certmgr/providers/1panel-ssl/1panel_ssl_test.go +++ b/pkg/core/certmgr/providers/1panel-ssl/1panel_ssl_test.go @@ -53,7 +53,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiKey: fApiKey, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/aliyun-cas/aliyun_cas_test.go b/pkg/core/certmgr/providers/aliyun-cas/aliyun_cas_test.go index 7c831359b..f4da192ba 100644 --- a/pkg/core/certmgr/providers/aliyun-cas/aliyun_cas_test.go +++ b/pkg/core/certmgr/providers/aliyun-cas/aliyun_cas_test.go @@ -53,7 +53,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("REGION: %v", fRegion), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/aliyun-slb/aliyun_slb_test.go b/pkg/core/certmgr/providers/aliyun-slb/aliyun_slb_test.go index a1bee316b..276bc4c58 100644 --- a/pkg/core/certmgr/providers/aliyun-slb/aliyun_slb_test.go +++ b/pkg/core/certmgr/providers/aliyun-slb/aliyun_slb_test.go @@ -53,7 +53,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("REGION: %v", fRegion), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/azure-keyvault/azure_keyvault_test.go b/pkg/core/certmgr/providers/azure-keyvault/azure_keyvault_test.go index 41d6afd56..2c858c825 100644 --- a/pkg/core/certmgr/providers/azure-keyvault/azure_keyvault_test.go +++ b/pkg/core/certmgr/providers/azure-keyvault/azure_keyvault_test.go @@ -61,7 +61,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("KEYVAULTNAME: %v", fKeyVaultName), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ TenantId: fTenantId, ClientId: fClientId, ClientSecret: fClientSecret, @@ -75,7 +75,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/baiducloud-cert/baiducloud_cert_test.go b/pkg/core/certmgr/providers/baiducloud-cert/baiducloud_cert_test.go index 38bb42adb..f06db113e 100644 --- a/pkg/core/certmgr/providers/baiducloud-cert/baiducloud_cert_test.go +++ b/pkg/core/certmgr/providers/baiducloud-cert/baiducloud_cert_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ctcccloud-ao/ctcccloud_ao_test.go b/pkg/core/certmgr/providers/ctcccloud-ao/ctcccloud_ao_test.go index 674473931..4ee2f1b4f 100644 --- a/pkg/core/certmgr/providers/ctcccloud-ao/ctcccloud_ao_test.go +++ b/pkg/core/certmgr/providers/ctcccloud-ao/ctcccloud_ao_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ctcccloud-cdn/ctcccloud_cdn_test.go b/pkg/core/certmgr/providers/ctcccloud-cdn/ctcccloud_cdn_test.go index f3bff8877..08094b704 100644 --- a/pkg/core/certmgr/providers/ctcccloud-cdn/ctcccloud_cdn_test.go +++ b/pkg/core/certmgr/providers/ctcccloud-cdn/ctcccloud_cdn_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ctcccloud-cms/ctcccloud_cms_test.go b/pkg/core/certmgr/providers/ctcccloud-cms/ctcccloud_cms_test.go index 451a8d95f..73cfee3cc 100644 --- a/pkg/core/certmgr/providers/ctcccloud-cms/ctcccloud_cms_test.go +++ b/pkg/core/certmgr/providers/ctcccloud-cms/ctcccloud_cms_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ctcccloud-elb/ctcccloud_elb_test.go b/pkg/core/certmgr/providers/ctcccloud-elb/ctcccloud_elb_test.go index 4983830c5..55752002a 100644 --- a/pkg/core/certmgr/providers/ctcccloud-elb/ctcccloud_elb_test.go +++ b/pkg/core/certmgr/providers/ctcccloud-elb/ctcccloud_elb_test.go @@ -53,7 +53,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("REGIONID: %v", fRegionId), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, RegionId: fRegionId, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ctcccloud-icdn/ctcccloud_icdn_test.go b/pkg/core/certmgr/providers/ctcccloud-icdn/ctcccloud_icdn_test.go index d6d1a1ee3..1c16999af 100644 --- a/pkg/core/certmgr/providers/ctcccloud-icdn/ctcccloud_icdn_test.go +++ b/pkg/core/certmgr/providers/ctcccloud-icdn/ctcccloud_icdn_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go b/pkg/core/certmgr/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go index 64a5fe616..cd1a64282 100644 --- a/pkg/core/certmgr/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go +++ b/pkg/core/certmgr/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/jdcloud-ssl/jdcloud_ssl_test.go b/pkg/core/certmgr/providers/jdcloud-ssl/jdcloud_ssl_test.go index 377b36bd1..e743ab515 100644 --- a/pkg/core/certmgr/providers/jdcloud-ssl/jdcloud_ssl_test.go +++ b/pkg/core/certmgr/providers/jdcloud-ssl/jdcloud_ssl_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("ACCESSKEYSECRET: %v", fAccessKeySecret), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/qiniu-sslcert/qiniu_sslcert_test.go b/pkg/core/certmgr/providers/qiniu-sslcert/qiniu_sslcert_test.go index fbeb928dd..377ba02a9 100644 --- a/pkg/core/certmgr/providers/qiniu-sslcert/qiniu_sslcert_test.go +++ b/pkg/core/certmgr/providers/qiniu-sslcert/qiniu_sslcert_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETKEY: %v", fSecretKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKey: fAccessKey, SecretKey: fSecretKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/rainyun-sslcenter/rainyun_sslcenter_test.go b/pkg/core/certmgr/providers/rainyun-sslcenter/rainyun_sslcenter_test.go index d763f4f2d..2bd663f8a 100644 --- a/pkg/core/certmgr/providers/rainyun-sslcenter/rainyun_sslcenter_test.go +++ b/pkg/core/certmgr/providers/rainyun-sslcenter/rainyun_sslcenter_test.go @@ -45,7 +45,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ ApiKey: fApiKey, }) if err != nil { @@ -55,7 +55,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/tencentcloud-ssl/tencentcloud_ssl_test.go b/pkg/core/certmgr/providers/tencentcloud-ssl/tencentcloud_ssl_test.go index 117539a72..851b3dcfa 100644 --- a/pkg/core/certmgr/providers/tencentcloud-ssl/tencentcloud_ssl_test.go +++ b/pkg/core/certmgr/providers/tencentcloud-ssl/tencentcloud_ssl_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETKEY: %v", fSecretKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ SecretId: fSecretId, SecretKey: fSecretKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/ucloud-ussl/ucloud_ussl_test.go b/pkg/core/certmgr/providers/ucloud-ussl/ucloud_ussl_test.go index b97bd93dd..e1e8fe4f4 100644 --- a/pkg/core/certmgr/providers/ucloud-ussl/ucloud_ussl_test.go +++ b/pkg/core/certmgr/providers/ucloud-ussl/ucloud_ussl_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("PUBLICKEY: %v", fPublicKey), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ PrivateKey: fPrivateKey, PublicKey: fPublicKey, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/upyun-ssl/upyun_ssl_test.go b/pkg/core/certmgr/providers/upyun-ssl/upyun_ssl_test.go index be62935a0..989cdd2c1 100644 --- a/pkg/core/certmgr/providers/upyun-ssl/upyun_ssl_test.go +++ b/pkg/core/certmgr/providers/upyun-ssl/upyun_ssl_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("PASSWORD: %v", fPassword), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ Username: fUsername, Password: fPassword, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/volcengine-certcenter/volcengine_certcenter_test.go b/pkg/core/certmgr/providers/volcengine-certcenter/volcengine_certcenter_test.go index 88853425a..bb9d3961d 100644 --- a/pkg/core/certmgr/providers/volcengine-certcenter/volcengine_certcenter_test.go +++ b/pkg/core/certmgr/providers/volcengine-certcenter/volcengine_certcenter_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("ACCESSKEYSECRET: %v", fAccessKeySecret), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/certmgr/providers/wangsu-certificate/wangsu_certificate_test.go b/pkg/core/certmgr/providers/wangsu-certificate/wangsu_certificate_test.go index bbf3da96e..1f5f9ef35 100644 --- a/pkg/core/certmgr/providers/wangsu-certificate/wangsu_certificate_test.go +++ b/pkg/core/certmgr/providers/wangsu-certificate/wangsu_certificate_test.go @@ -49,7 +49,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("ACCESSKEYSECRET: %v", fAccessKeySecret), }, "\n")) - sslmanager, err := provider.NewCertmgr(&provider.CertmgrConfig{ + provider, err := provider.NewCertmgr(&provider.CertmgrConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, }) @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := sslmanager.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Upload(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/1panel-console/1panel_console_test.go b/pkg/core/deployer/providers/1panel-console/1panel_console_test.go index a0956724f..12669c849 100644 --- a/pkg/core/deployer/providers/1panel-console/1panel_console_test.go +++ b/pkg/core/deployer/providers/1panel-console/1panel_console_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiKey: fApiKey, @@ -66,7 +66,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/1panel-site/1panel_site_test.go b/pkg/core/deployer/providers/1panel-site/1panel_site_test.go index 55c40d720..61b7fc6ef 100644 --- a/pkg/core/deployer/providers/1panel-site/1panel_site_test.go +++ b/pkg/core/deployer/providers/1panel-site/1panel_site_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("WEBSITEID: %v", fWebsiteId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiKey: fApiKey, @@ -71,7 +71,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-alb/aliyun_alb_test.go b/pkg/core/deployer/providers/aliyun-alb/aliyun_alb_test.go index cab4b23d6..9b4c5e1ae 100644 --- a/pkg/core/deployer/providers/aliyun-alb/aliyun_alb_test.go +++ b/pkg/core/deployer/providers/aliyun-alb/aliyun_alb_test.go @@ -63,7 +63,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -78,7 +78,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -99,7 +99,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -114,7 +114,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-apigw/aliyun_apigw_test.go b/pkg/core/deployer/providers/aliyun-apigw/aliyun_apigw_test.go index f4b06b3b2..bbaebac71 100644 --- a/pkg/core/deployer/providers/aliyun-apigw/aliyun_apigw_test.go +++ b/pkg/core/deployer/providers/aliyun-apigw/aliyun_apigw_test.go @@ -68,7 +68,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -85,7 +85,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-cdn/aliyun_cdn_test.go b/pkg/core/deployer/providers/aliyun-cdn/aliyun_cdn_test.go index 216ff25e4..f61d9d204 100644 --- a/pkg/core/deployer/providers/aliyun-cdn/aliyun_cdn_test.go +++ b/pkg/core/deployer/providers/aliyun-cdn/aliyun_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-clb/aliyun_clb_test.go b/pkg/core/deployer/providers/aliyun-clb/aliyun_clb_test.go index ba03d0956..d03a3dd76 100644 --- a/pkg/core/deployer/providers/aliyun-clb/aliyun_clb_test.go +++ b/pkg/core/deployer/providers/aliyun-clb/aliyun_clb_test.go @@ -63,7 +63,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -78,7 +78,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -99,7 +99,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERPORT: %v", fListenerPort), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -115,7 +115,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-dcdn/aliyun_dcdn_test.go b/pkg/core/deployer/providers/aliyun-dcdn/aliyun_dcdn_test.go index d48e4e5da..69cf93a4d 100644 --- a/pkg/core/deployer/providers/aliyun-dcdn/aliyun_dcdn_test.go +++ b/pkg/core/deployer/providers/aliyun-dcdn/aliyun_dcdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-ddospro/aliyun_ddospro_test.go b/pkg/core/deployer/providers/aliyun-ddospro/aliyun_ddospro_test.go index 960d472fb..c28862b78 100644 --- a/pkg/core/deployer/providers/aliyun-ddospro/aliyun_ddospro_test.go +++ b/pkg/core/deployer/providers/aliyun-ddospro/aliyun_ddospro_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-esa/aliyun_esa_test.go b/pkg/core/deployer/providers/aliyun-esa/aliyun_esa_test.go index 9328a1949..f4351be9c 100644 --- a/pkg/core/deployer/providers/aliyun-esa/aliyun_esa_test.go +++ b/pkg/core/deployer/providers/aliyun-esa/aliyun_esa_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SITEID: %v", fSiteId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-fc/aliyun_fc_test.go b/pkg/core/deployer/providers/aliyun-fc/aliyun_fc_test.go index 206c7622a..0d1e6e378 100644 --- a/pkg/core/deployer/providers/aliyun-fc/aliyun_fc_test.go +++ b/pkg/core/deployer/providers/aliyun-fc/aliyun_fc_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -71,7 +71,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-ga/aliyun_ga_test.go b/pkg/core/deployer/providers/aliyun-ga/aliyun_ga_test.go index 67a180cea..bbef35913 100644 --- a/pkg/core/deployer/providers/aliyun-ga/aliyun_ga_test.go +++ b/pkg/core/deployer/providers/aliyun-ga/aliyun_ga_test.go @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, ResourceType: provider.RESOURCE_TYPE_ACCELERATOR, @@ -73,7 +73,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -93,7 +93,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, ResourceType: provider.RESOURCE_TYPE_LISTENER, @@ -107,7 +107,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-live/aliyun_live_test.go b/pkg/core/deployer/providers/aliyun-live/aliyun_live_test.go index 3462ef03e..30450d527 100644 --- a/pkg/core/deployer/providers/aliyun-live/aliyun_live_test.go +++ b/pkg/core/deployer/providers/aliyun-live/aliyun_live_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-nlb/aliyun_nlb_test.go b/pkg/core/deployer/providers/aliyun-nlb/aliyun_nlb_test.go index 64df8ff98..248d639f9 100644 --- a/pkg/core/deployer/providers/aliyun-nlb/aliyun_nlb_test.go +++ b/pkg/core/deployer/providers/aliyun-nlb/aliyun_nlb_test.go @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LOADBALANCERID: %v", fLoadbalancerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -73,7 +73,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -94,7 +94,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -108,7 +108,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-oss/aliyun_oss_test.go b/pkg/core/deployer/providers/aliyun-oss/aliyun_oss_test.go index 751550726..5c9112bea 100644 --- a/pkg/core/deployer/providers/aliyun-oss/aliyun_oss_test.go +++ b/pkg/core/deployer/providers/aliyun-oss/aliyun_oss_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-vod/aliyun_vod_test.go b/pkg/core/deployer/providers/aliyun-vod/aliyun_vod_test.go index 93ed8c137..4d5a6f6aa 100644 --- a/pkg/core/deployer/providers/aliyun-vod/aliyun_vod_test.go +++ b/pkg/core/deployer/providers/aliyun-vod/aliyun_vod_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aliyun-waf/aliyun_waf_test.go b/pkg/core/deployer/providers/aliyun-waf/aliyun_waf_test.go index 51fbb2408..7c73861d4 100644 --- a/pkg/core/deployer/providers/aliyun-waf/aliyun_waf_test.go +++ b/pkg/core/deployer/providers/aliyun-waf/aliyun_waf_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("INSTANCEID: %v", fInstanceId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/apisix/apisix_test.go b/pkg/core/deployer/providers/apisix/apisix_test.go index 5b48fa31a..c8c139aa2 100644 --- a/pkg/core/deployer/providers/apisix/apisix_test.go +++ b/pkg/core/deployer/providers/apisix/apisix_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -66,7 +66,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/aws-cloudfront/aws_cloudfront_test.go b/pkg/core/deployer/providers/aws-cloudfront/aws_cloudfront_test.go index ec44cedd4..36d927a5a 100644 --- a/pkg/core/deployer/providers/aws-cloudfront/aws_cloudfront_test.go +++ b/pkg/core/deployer/providers/aws-cloudfront/aws_cloudfront_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DISTRIBUTIONID: %v", fDistribuitionId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baiducloud-appblb/baiducloud_appblb_test.go b/pkg/core/deployer/providers/baiducloud-appblb/baiducloud_appblb_test.go index abc9a3cb0..1688fd74b 100644 --- a/pkg/core/deployer/providers/baiducloud-appblb/baiducloud_appblb_test.go +++ b/pkg/core/deployer/providers/baiducloud-appblb/baiducloud_appblb_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, ResourceType: provider.RESOURCE_TYPE_LOADBALANCER, @@ -75,7 +75,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baiducloud-blb/baiducloud_blb_test.go b/pkg/core/deployer/providers/baiducloud-blb/baiducloud_blb_test.go index 5be46f991..15efb045b 100644 --- a/pkg/core/deployer/providers/baiducloud-blb/baiducloud_blb_test.go +++ b/pkg/core/deployer/providers/baiducloud-blb/baiducloud_blb_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, ResourceType: provider.RESOURCE_TYPE_LOADBALANCER, @@ -75,7 +75,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baiducloud-cdn/baiducloud_cdn_test.go b/pkg/core/deployer/providers/baiducloud-cdn/baiducloud_cdn_test.go index b86c9fd0f..9d9f9a9de 100644 --- a/pkg/core/deployer/providers/baiducloud-cdn/baiducloud_cdn_test.go +++ b/pkg/core/deployer/providers/baiducloud-cdn/baiducloud_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baishan-cdn/baishan_cdn_test.go b/pkg/core/deployer/providers/baishan-cdn/baishan_cdn_test.go index a8725b303..a7b6e8231 100644 --- a/pkg/core/deployer/providers/baishan-cdn/baishan_cdn_test.go +++ b/pkg/core/deployer/providers/baishan-cdn/baishan_cdn_test.go @@ -48,7 +48,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ApiToken: fApiToken, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, Domain: fDomain, @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go b/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go index 6a28e93d3..7da27b3d1 100644 --- a/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go +++ b/pkg/core/deployer/providers/baotapanel-console/baotapanel_console_test.go @@ -48,7 +48,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -61,7 +61,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go b/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go index d9fdeba3a..7c20971db 100644 --- a/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go +++ b/pkg/core/deployer/providers/baotapanel-site/baotapanel_site_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SITENAME: %v", fSiteName), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -71,7 +71,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baotapanelgo-console/baotapanelgo_console_test.go b/pkg/core/deployer/providers/baotapanelgo-console/baotapanelgo_console_test.go index fe175cef2..9e2391205 100644 --- a/pkg/core/deployer/providers/baotapanelgo-console/baotapanelgo_console_test.go +++ b/pkg/core/deployer/providers/baotapanelgo-console/baotapanelgo_console_test.go @@ -48,7 +48,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baotapanelgo-site/baotapanelgo_site_test.go b/pkg/core/deployer/providers/baotapanelgo-site/baotapanelgo_site_test.go index 2c1482d8c..8d8ecdb81 100644 --- a/pkg/core/deployer/providers/baotapanelgo-site/baotapanelgo_site_test.go +++ b/pkg/core/deployer/providers/baotapanelgo-site/baotapanelgo_site_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SITENAME: %v", fSiteName), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go b/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go index 1e76cbf14..5d3ad201a 100644 --- a/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go +++ b/pkg/core/deployer/providers/baotawaf-console/baotawaf_console_test.go @@ -50,7 +50,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APIKEY: %v", fApiKey), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -62,7 +62,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go b/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go index 7048cd8be..07018ad45 100644 --- a/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go +++ b/pkg/core/deployer/providers/baotawaf-site/baotawaf_site_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SITEPORT: %v", fSitePort), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, AllowInsecureConnections: true, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/bunny-cdn/bunny_cdn_test.go b/pkg/core/deployer/providers/bunny-cdn/bunny_cdn_test.go index fb6b2ffd7..b120889d8 100644 --- a/pkg/core/deployer/providers/bunny-cdn/bunny_cdn_test.go +++ b/pkg/core/deployer/providers/bunny-cdn/bunny_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("HOSTNAME: %v", fHostName), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ApiKey: fApiKey, PullZoneId: fPullZoneId, Hostname: fHostName, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/byteplus-cdn/byteplus_cdn_test.go b/pkg/core/deployer/providers/byteplus-cdn/byteplus_cdn_test.go index 7ab7b8254..ddd45accb 100644 --- a/pkg/core/deployer/providers/byteplus-cdn/byteplus_cdn_test.go +++ b/pkg/core/deployer/providers/byteplus-cdn/byteplus_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKey: fAccessKey, SecretKey: fSecretKey, Domain: fDomain, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/cachefly/cachefly_test.go b/pkg/core/deployer/providers/cachefly/cachefly_test.go index 01857235e..9495e18ad 100644 --- a/pkg/core/deployer/providers/cachefly/cachefly_test.go +++ b/pkg/core/deployer/providers/cachefly/cachefly_test.go @@ -44,7 +44,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("APITOKEN: %v", fApiToken), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ApiToken: fApiToken, }) if err != nil { @@ -54,7 +54,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/cdnfly/cdnfly_test.go b/pkg/core/deployer/providers/cdnfly/cdnfly_test.go index ca3f087cc..c6cc73bbb 100644 --- a/pkg/core/deployer/providers/cdnfly/cdnfly_test.go +++ b/pkg/core/deployer/providers/cdnfly/cdnfly_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiKey: fApiKey, ApiSecret: fApiSecret, @@ -71,7 +71,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ctcccloud-ao/ctcccloud_ao_test.go b/pkg/core/deployer/providers/ctcccloud-ao/ctcccloud_ao_test.go index a17faf10f..94a08108f 100644 --- a/pkg/core/deployer/providers/ctcccloud-ao/ctcccloud_ao_test.go +++ b/pkg/core/deployer/providers/ctcccloud-ao/ctcccloud_ao_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ctcccloud-cdn/ctcccloud_cdn_test.go b/pkg/core/deployer/providers/ctcccloud-cdn/ctcccloud_cdn_test.go index 9b0de8fa6..984580517 100644 --- a/pkg/core/deployer/providers/ctcccloud-cdn/ctcccloud_cdn_test.go +++ b/pkg/core/deployer/providers/ctcccloud-cdn/ctcccloud_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ctcccloud-cms/ctcccloud_cms_test.go b/pkg/core/deployer/providers/ctcccloud-cms/ctcccloud_cms_test.go index b6c0eb41a..cfb366e8a 100644 --- a/pkg/core/deployer/providers/ctcccloud-cms/ctcccloud_cms_test.go +++ b/pkg/core/deployer/providers/ctcccloud-cms/ctcccloud_cms_test.go @@ -48,7 +48,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETACCESSKEY: %v", fSecretAccessKey), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, }) @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ctcccloud-elb/ctcccloud_elb_test.go b/pkg/core/deployer/providers/ctcccloud-elb/ctcccloud_elb_test.go index f7c5c38a9..ffd8949ae 100644 --- a/pkg/core/deployer/providers/ctcccloud-elb/ctcccloud_elb_test.go +++ b/pkg/core/deployer/providers/ctcccloud-elb/ctcccloud_elb_test.go @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LOADBALANCERID: %v", fLoadbalancerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, RegionId: fRegionId, @@ -73,7 +73,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -93,7 +93,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, RegionId: fRegionId, @@ -107,7 +107,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ctcccloud-icdn/ctcccloud_icdn_test.go b/pkg/core/deployer/providers/ctcccloud-icdn/ctcccloud_icdn_test.go index f79395d62..94c753cf8 100644 --- a/pkg/core/deployer/providers/ctcccloud-icdn/ctcccloud_icdn_test.go +++ b/pkg/core/deployer/providers/ctcccloud-icdn/ctcccloud_icdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go b/pkg/core/deployer/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go index 971523c13..1c29e69c3 100644 --- a/pkg/core/deployer/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go +++ b/pkg/core/deployer/providers/ctcccloud-lvdn/ctcccloud_lvdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/dogecloud-cdn/dogecloud_cdn_test.go b/pkg/core/deployer/providers/dogecloud-cdn/dogecloud_cdn_test.go index e24d74d14..7daa9927d 100644 --- a/pkg/core/deployer/providers/dogecloud-cdn/dogecloud_cdn_test.go +++ b/pkg/core/deployer/providers/dogecloud-cdn/dogecloud_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKey: fAccessKey, SecretKey: fSecretKey, Domain: fDomain, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/flexcdn/flexcdn_test.go b/pkg/core/deployer/providers/flexcdn/flexcdn_test.go index 33be6e409..1eb762f50 100644 --- a/pkg/core/deployer/providers/flexcdn/flexcdn_test.go +++ b/pkg/core/deployer/providers/flexcdn/flexcdn_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiRole: "user", AccessKeyId: fAccessKeyId, @@ -72,7 +72,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/gcore-cdn/gcore_cdn_test.go b/pkg/core/deployer/providers/gcore-cdn/gcore_cdn_test.go index fae6c8e42..7a8f21d79 100644 --- a/pkg/core/deployer/providers/gcore-cdn/gcore_cdn_test.go +++ b/pkg/core/deployer/providers/gcore-cdn/gcore_cdn_test.go @@ -48,7 +48,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("RESOURCEID: %v", fResourceId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ApiToken: fApiToken, ResourceId: fResourceId, }) @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/goedge/goedge_test.go b/pkg/core/deployer/providers/goedge/goedge_test.go index 22ce2a949..d4dabadf3 100644 --- a/pkg/core/deployer/providers/goedge/goedge_test.go +++ b/pkg/core/deployer/providers/goedge/goedge_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiRole: "user", AccessKeyId: fAccessKeyId, @@ -72,7 +72,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn_test.go b/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn_test.go index eb94795b4..d9d795561 100644 --- a/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn_test.go +++ b/pkg/core/deployer/providers/huaweicloud-cdn/huaweicloud_cdn_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/huaweicloud-elb/huaweicloud_elb_test.go b/pkg/core/deployer/providers/huaweicloud-elb/huaweicloud_elb_test.go index 8f8d44df0..fdd992c72 100644 --- a/pkg/core/deployer/providers/huaweicloud-elb/huaweicloud_elb_test.go +++ b/pkg/core/deployer/providers/huaweicloud-elb/huaweicloud_elb_test.go @@ -62,7 +62,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -76,7 +76,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -96,7 +96,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LOADBALANCERID: %v", fLoadbalancerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -110,7 +110,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -130,7 +130,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -144,7 +144,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/huaweicloud-obs/huaweicloud_obs_test.go b/pkg/core/deployer/providers/huaweicloud-obs/huaweicloud_obs_test.go index b6ffc9edc..8b67d38a3 100644 --- a/pkg/core/deployer/providers/huaweicloud-obs/huaweicloud_obs_test.go +++ b/pkg/core/deployer/providers/huaweicloud-obs/huaweicloud_obs_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/huaweicloud-waf/huaweicloud_waf_test.go b/pkg/core/deployer/providers/huaweicloud-waf/huaweicloud_waf_test.go index 39c815d43..14b1e8e3e 100644 --- a/pkg/core/deployer/providers/huaweicloud-waf/huaweicloud_waf_test.go +++ b/pkg/core/deployer/providers/huaweicloud-waf/huaweicloud_waf_test.go @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("RESOURCETYPE: %v", fResourceType), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, Region: fRegion, @@ -73,7 +73,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/jdcloud-alb/jdcloud_alb_test.go b/pkg/core/deployer/providers/jdcloud-alb/jdcloud_alb_test.go index a7b92cfe5..fa5f8b58c 100644 --- a/pkg/core/deployer/providers/jdcloud-alb/jdcloud_alb_test.go +++ b/pkg/core/deployer/providers/jdcloud-alb/jdcloud_alb_test.go @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LOADBALANCERID: %v", fLoadbalancerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, RegionId: fRegionId, @@ -73,7 +73,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -93,7 +93,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, RegionId: fRegionId, @@ -107,7 +107,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/jdcloud-cdn/jdcloud_cdn_test.go b/pkg/core/deployer/providers/jdcloud-cdn/jdcloud_cdn_test.go index 1bcc1919d..3abd9f6cc 100644 --- a/pkg/core/deployer/providers/jdcloud-cdn/jdcloud_cdn_test.go +++ b/pkg/core/deployer/providers/jdcloud-cdn/jdcloud_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/jdcloud-live/jdcloud_live_test.go b/pkg/core/deployer/providers/jdcloud-live/jdcloud_live_test.go index 5ad7d5e08..beb0c1c32 100644 --- a/pkg/core/deployer/providers/jdcloud-live/jdcloud_live_test.go +++ b/pkg/core/deployer/providers/jdcloud-live/jdcloud_live_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/jdcloud-vod/jdcloud_vod_test.go b/pkg/core/deployer/providers/jdcloud-vod/jdcloud_vod_test.go index 7b62411dc..48b0ed5f2 100644 --- a/pkg/core/deployer/providers/jdcloud-vod/jdcloud_vod_test.go +++ b/pkg/core/deployer/providers/jdcloud-vod/jdcloud_vod_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/k8s-secret/k8s_secret_test.go b/pkg/core/deployer/providers/k8s-secret/k8s_secret_test.go index 911a054c7..1af4be41d 100644 --- a/pkg/core/deployer/providers/k8s-secret/k8s_secret_test.go +++ b/pkg/core/deployer/providers/k8s-secret/k8s_secret_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SECRETDATAKEYFORKEY: %v", fSecretDataKeyForKey), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ Namespace: fNamespace, SecretName: fSecretName, SecretDataKeyForCrt: fSecretDataKeyForCrt, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/kong/kong_test.go b/pkg/core/deployer/providers/kong/kong_test.go index b13224ea7..3c9a13392 100644 --- a/pkg/core/deployer/providers/kong/kong_test.go +++ b/pkg/core/deployer/providers/kong/kong_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiToken: fApiToken, AllowInsecureConnections: true, @@ -66,7 +66,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ksyun-cdn/ksyun_cdn_test.go b/pkg/core/deployer/providers/ksyun-cdn/ksyun_cdn_test.go index 91a071200..6964c9750 100644 --- a/pkg/core/deployer/providers/ksyun-cdn/ksyun_cdn_test.go +++ b/pkg/core/deployer/providers/ksyun-cdn/ksyun_cdn_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, SecretAccessKey: fSecretAccessKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/lecdn/lecdn_test.go b/pkg/core/deployer/providers/lecdn/lecdn_test.go index eae28620f..c916c381f 100644 --- a/pkg/core/deployer/providers/lecdn/lecdn_test.go +++ b/pkg/core/deployer/providers/lecdn/lecdn_test.go @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiVersion: fApiVersion, ApiRole: "user", @@ -76,7 +76,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/local/local_test.go b/pkg/core/deployer/providers/local/local_test.go index 15375d5bc..de3d301a1 100644 --- a/pkg/core/deployer/providers/local/local_test.go +++ b/pkg/core/deployer/providers/local/local_test.go @@ -72,7 +72,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("POSTCOMMAND: %v", fPostCommand), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ OutputFormat: provider.OUTPUT_FORMAT_PEM, OutputCertPath: fOutputCertPath + ".pem", OutputKeyPath: fOutputKeyPath + ".pem", @@ -87,7 +87,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -123,7 +123,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("PFXPASSWORD: %v", fPfxPassword), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ OutputFormat: provider.OUTPUT_FORMAT_PFX, OutputCertPath: fOutputCertPath + ".pfx", PfxPassword: fPfxPassword, @@ -135,7 +135,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -164,7 +164,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("JKSSTOREPASS: %v", fJksStorepass), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ OutputFormat: provider.OUTPUT_FORMAT_JKS, OutputCertPath: fOutputCertPath + ".jks", JksAlias: fJksAlias, @@ -178,7 +178,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/netlify-site/netlify_site_test.go b/pkg/core/deployer/providers/netlify-site/netlify_site_test.go index c93c5aede..4ff6c47d7 100644 --- a/pkg/core/deployer/providers/netlify-site/netlify_site_test.go +++ b/pkg/core/deployer/providers/netlify-site/netlify_site_test.go @@ -48,7 +48,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SITEID: %v", fSiteId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ApiToken: fApiToken, SiteId: fSiteId, }) @@ -59,7 +59,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go b/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go index 7e0624445..7f39774ea 100644 --- a/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go +++ b/pkg/core/deployer/providers/proxmoxve/proxmoxve_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("NODENAME: %v", fNodeName), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiToken: fApiToken, ApiTokenSecret: fApiTokenSecret, @@ -71,7 +71,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/qiniu-cdn/qiniu_cdn_test.go b/pkg/core/deployer/providers/qiniu-cdn/qiniu_cdn_test.go index 0eed31f40..c6bc15d46 100644 --- a/pkg/core/deployer/providers/qiniu-cdn/qiniu_cdn_test.go +++ b/pkg/core/deployer/providers/qiniu-cdn/qiniu_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKey: fAccessKey, SecretKey: fSecretKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/qiniu-kodo/qiniu_kodo_test.go b/pkg/core/deployer/providers/qiniu-kodo/qiniu_kodo_test.go index 5b35d0271..179f524fb 100644 --- a/pkg/core/deployer/providers/qiniu-kodo/qiniu_kodo_test.go +++ b/pkg/core/deployer/providers/qiniu-kodo/qiniu_kodo_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKey: fAccessKey, SecretKey: fSecretKey, Bucket: fBucket, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/qiniu-pili/qiniu_pili_test.go b/pkg/core/deployer/providers/qiniu-pili/qiniu_pili_test.go index c4427ddb2..da53be8ea 100644 --- a/pkg/core/deployer/providers/qiniu-pili/qiniu_pili_test.go +++ b/pkg/core/deployer/providers/qiniu-pili/qiniu_pili_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKey: fAccessKey, SecretKey: fSecretKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/rainyun-rcdn/rainyun_rcdn_test.go b/pkg/core/deployer/providers/rainyun-rcdn/rainyun_rcdn_test.go index 32f56de34..da9641b2f 100644 --- a/pkg/core/deployer/providers/rainyun-rcdn/rainyun_rcdn_test.go +++ b/pkg/core/deployer/providers/rainyun-rcdn/rainyun_rcdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ApiKey: fApiKey, InstanceId: fInstanceId, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go b/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go index 1a0662c84..6b3569c68 100644 --- a/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go +++ b/pkg/core/deployer/providers/ratpanel-console/ratpanel_console_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("ACCESSTOKEN: %v", fAccessToken), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, AccessTokenId: fAccessTokenId, AccessToken: fAccessToken, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go b/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go index d12b36a1e..6299c1028 100644 --- a/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go +++ b/pkg/core/deployer/providers/ratpanel-site/ratpanel_site_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("SITENAME: %v", fSiteName), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, AccessTokenId: fAccessTokenId, AccessToken: fAccessToken, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/safeline/safeline_test.go b/pkg/core/deployer/providers/safeline/safeline_test.go index 599a35c06..f5679f2af 100644 --- a/pkg/core/deployer/providers/safeline/safeline_test.go +++ b/pkg/core/deployer/providers/safeline/safeline_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ ServerUrl: fServerUrl, ApiToken: fApiToken, AllowInsecureConnections: true, @@ -66,7 +66,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ssh/ssh_test.go b/pkg/core/deployer/providers/ssh/ssh_test.go index 18296cf06..620055569 100644 --- a/pkg/core/deployer/providers/ssh/ssh_test.go +++ b/pkg/core/deployer/providers/ssh/ssh_test.go @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("OUTPUTKEYPATH: %v", fOutputKeyPath), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SshHost: fSshHost, SshPort: int32(fSshPort), SshUsername: fSshUsername, @@ -79,7 +79,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) } diff --git a/pkg/core/deployer/providers/tencentcloud-cdn/tencentcloud_cdn_test.go b/pkg/core/deployer/providers/tencentcloud-cdn/tencentcloud_cdn_test.go index bb0e7d1e8..1bc1db3c7 100644 --- a/pkg/core/deployer/providers/tencentcloud-cdn/tencentcloud_cdn_test.go +++ b/pkg/core/deployer/providers/tencentcloud-cdn/tencentcloud_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-clb/tencentcloud_clb_test.go b/pkg/core/deployer/providers/tencentcloud-clb/tencentcloud_clb_test.go index 092acf098..a68c9a336 100644 --- a/pkg/core/deployer/providers/tencentcloud-clb/tencentcloud_clb_test.go +++ b/pkg/core/deployer/providers/tencentcloud-clb/tencentcloud_clb_test.go @@ -62,7 +62,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LOADBALANCERID: %v", fLoadbalancerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Region: fRegion, @@ -76,7 +76,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -97,7 +97,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Region: fRegion, @@ -112,7 +112,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return @@ -134,7 +134,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Region: fRegion, @@ -150,7 +150,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-cos/tencentcloud_cos_test.go b/pkg/core/deployer/providers/tencentcloud-cos/tencentcloud_cos_test.go index d79f3fbc1..005fd67bb 100644 --- a/pkg/core/deployer/providers/tencentcloud-cos/tencentcloud_cos_test.go +++ b/pkg/core/deployer/providers/tencentcloud-cos/tencentcloud_cos_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Region: fRegion, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-css/tencentcloud_css_test.go b/pkg/core/deployer/providers/tencentcloud-css/tencentcloud_css_test.go index 3298d9ca3..52cff47ab 100644 --- a/pkg/core/deployer/providers/tencentcloud-css/tencentcloud_css_test.go +++ b/pkg/core/deployer/providers/tencentcloud-css/tencentcloud_css_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Domain: fDomain, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-ecdn/tencentcloud_ecdn_test.go b/pkg/core/deployer/providers/tencentcloud-ecdn/tencentcloud_ecdn_test.go index 8c0688c90..3fc537d8e 100644 --- a/pkg/core/deployer/providers/tencentcloud-ecdn/tencentcloud_ecdn_test.go +++ b/pkg/core/deployer/providers/tencentcloud-ecdn/tencentcloud_ecdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-eo/tencentcloud_eo_test.go b/pkg/core/deployer/providers/tencentcloud-eo/tencentcloud_eo_test.go index 302fa191b..f7f6ea23f 100644 --- a/pkg/core/deployer/providers/tencentcloud-eo/tencentcloud_eo_test.go +++ b/pkg/core/deployer/providers/tencentcloud-eo/tencentcloud_eo_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAINS: %v", fDomains), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, ZoneId: fZoneId, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-gaap/tencentcloud_gaap_test.go b/pkg/core/deployer/providers/tencentcloud-gaap/tencentcloud_gaap_test.go index 24ec50b1c..7c5864a9b 100644 --- a/pkg/core/deployer/providers/tencentcloud-gaap/tencentcloud_gaap_test.go +++ b/pkg/core/deployer/providers/tencentcloud-gaap/tencentcloud_gaap_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, ResourceType: provider.RESOURCE_TYPE_LISTENER, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-scf/tencentcloud_scf_test.go b/pkg/core/deployer/providers/tencentcloud-scf/tencentcloud_scf_test.go index ffc8bf4d2..90d72601a 100644 --- a/pkg/core/deployer/providers/tencentcloud-scf/tencentcloud_scf_test.go +++ b/pkg/core/deployer/providers/tencentcloud-scf/tencentcloud_scf_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-vod/tencentcloud_vod_test.go b/pkg/core/deployer/providers/tencentcloud-vod/tencentcloud_vod_test.go index 14e6f7fec..246a694f4 100644 --- a/pkg/core/deployer/providers/tencentcloud-vod/tencentcloud_vod_test.go +++ b/pkg/core/deployer/providers/tencentcloud-vod/tencentcloud_vod_test.go @@ -58,7 +58,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("INSTANCEID: %v", fInstanceId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, SubAppId: fSubAppId, @@ -72,7 +72,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/tencentcloud-waf/tencentcloud_waf_test.go b/pkg/core/deployer/providers/tencentcloud-waf/tencentcloud_waf_test.go index a3d6b589a..5b0922ddc 100644 --- a/pkg/core/deployer/providers/tencentcloud-waf/tencentcloud_waf_test.go +++ b/pkg/core/deployer/providers/tencentcloud-waf/tencentcloud_waf_test.go @@ -63,7 +63,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("INSTANCEID: %v", fInstanceId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ SecretId: fSecretId, SecretKey: fSecretKey, Region: fRegion, @@ -78,7 +78,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ucloud-ucdn/ucloud_ucdn_test.go b/pkg/core/deployer/providers/ucloud-ucdn/ucloud_ucdn_test.go index 466bad314..3d4c9c366 100644 --- a/pkg/core/deployer/providers/ucloud-ucdn/ucloud_ucdn_test.go +++ b/pkg/core/deployer/providers/ucloud-ucdn/ucloud_ucdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomainId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ PrivateKey: fPrivateKey, PublicKey: fPublicKey, DomainId: fDomainId, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/ucloud-us3/ucloud_us3_test.go b/pkg/core/deployer/providers/ucloud-us3/ucloud_us3_test.go index 5a56aa928..bc9717268 100644 --- a/pkg/core/deployer/providers/ucloud-us3/ucloud_us3_test.go +++ b/pkg/core/deployer/providers/ucloud-us3/ucloud_us3_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ PrivateKey: fPrivateKey, PublicKey: fPublicKey, Region: fRegion, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/unicloud-webhost/unicloud_webhost_test.go b/pkg/core/deployer/providers/unicloud-webhost/unicloud_webhost_test.go index 18b91093d..c38400d51 100644 --- a/pkg/core/deployer/providers/unicloud-webhost/unicloud_webhost_test.go +++ b/pkg/core/deployer/providers/unicloud-webhost/unicloud_webhost_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ Username: fUsername, Password: fPassword, SpaceProvider: fSpaceProvider, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/upyun-cdn/upyun_cdn_test.go b/pkg/core/deployer/providers/upyun-cdn/upyun_cdn_test.go index c7de215d9..3102247ff 100644 --- a/pkg/core/deployer/providers/upyun-cdn/upyun_cdn_test.go +++ b/pkg/core/deployer/providers/upyun-cdn/upyun_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ Username: fUsername, Password: fPassword, Domain: fDomain, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/upyun-file/upyun_file_test.go b/pkg/core/deployer/providers/upyun-file/upyun_file_test.go index c411d2983..fcc7e4890 100644 --- a/pkg/core/deployer/providers/upyun-file/upyun_file_test.go +++ b/pkg/core/deployer/providers/upyun-file/upyun_file_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ Username: fUsername, Password: fPassword, Bucket: fBucket, @@ -69,7 +69,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-alb/volcengine_alb_test.go b/pkg/core/deployer/providers/volcengine-alb/volcengine_alb_test.go index d257bbf5a..4f62771f0 100644 --- a/pkg/core/deployer/providers/volcengine-alb/volcengine_alb_test.go +++ b/pkg/core/deployer/providers/volcengine-alb/volcengine_alb_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-cdn/volcengine_cdn_test.go b/pkg/core/deployer/providers/volcengine-cdn/volcengine_cdn_test.go index 928025f95..ec1d182cb 100644 --- a/pkg/core/deployer/providers/volcengine-cdn/volcengine_cdn_test.go +++ b/pkg/core/deployer/providers/volcengine-cdn/volcengine_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-clb/volcengine_clb_test.go b/pkg/core/deployer/providers/volcengine-clb/volcengine_clb_test.go index 8d9d45407..16b5de246 100644 --- a/pkg/core/deployer/providers/volcengine-clb/volcengine_clb_test.go +++ b/pkg/core/deployer/providers/volcengine-clb/volcengine_clb_test.go @@ -56,7 +56,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("LISTENERID: %v", fListenerId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -70,7 +70,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-dcdn/volcengine_dcdn_test.go b/pkg/core/deployer/providers/volcengine-dcdn/volcengine_dcdn_test.go index a589b8d85..8e297cc17 100644 --- a/pkg/core/deployer/providers/volcengine-dcdn/volcengine_dcdn_test.go +++ b/pkg/core/deployer/providers/volcengine-dcdn/volcengine_dcdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-imagex/volcengine_imagex_test.go b/pkg/core/deployer/providers/volcengine-imagex/volcengine_imagex_test.go index b8d3f43cb..9d08b22a1 100644 --- a/pkg/core/deployer/providers/volcengine-imagex/volcengine_imagex_test.go +++ b/pkg/core/deployer/providers/volcengine-imagex/volcengine_imagex_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-live/volcengine_live_test.go b/pkg/core/deployer/providers/volcengine-live/volcengine_live_test.go index 86185562d..2ca72af8e 100644 --- a/pkg/core/deployer/providers/volcengine-live/volcengine_live_test.go +++ b/pkg/core/deployer/providers/volcengine-live/volcengine_live_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, DomainMatchPattern: provider.DOMAIN_MATCH_PATTERN_EXACT, @@ -65,7 +65,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/volcengine-tos/volcengine_tos_test.go b/pkg/core/deployer/providers/volcengine-tos/volcengine_tos_test.go index fb7ba73ca..5e4ecd934 100644 --- a/pkg/core/deployer/providers/volcengine-tos/volcengine_tos_test.go +++ b/pkg/core/deployer/providers/volcengine-tos/volcengine_tos_test.go @@ -60,7 +60,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Region: fRegion, @@ -74,7 +74,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/wangsu-cdn/wangsu_cdn_test.go b/pkg/core/deployer/providers/wangsu-cdn/wangsu_cdn_test.go index 87aa744dc..6fd846adb 100644 --- a/pkg/core/deployer/providers/wangsu-cdn/wangsu_cdn_test.go +++ b/pkg/core/deployer/providers/wangsu-cdn/wangsu_cdn_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("DOMAIN: %v", fDomain), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, Domains: []string{fDomain}, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/wangsu-cdnpro/wangsu_cdnpro_test.go b/pkg/core/deployer/providers/wangsu-cdnpro/wangsu_cdnpro_test.go index ce142ec2c..3359d6eb6 100644 --- a/pkg/core/deployer/providers/wangsu-cdnpro/wangsu_cdnpro_test.go +++ b/pkg/core/deployer/providers/wangsu-cdnpro/wangsu_cdnpro_test.go @@ -68,7 +68,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("WEBHOOKID: %v", fWebhookId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, ApiKey: fApiKey, @@ -84,7 +84,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/wangsu-certificate/wangsu_certificate_test.go b/pkg/core/deployer/providers/wangsu-certificate/wangsu_certificate_test.go index 1e46bc39e..2fac917ea 100644 --- a/pkg/core/deployer/providers/wangsu-certificate/wangsu_certificate_test.go +++ b/pkg/core/deployer/providers/wangsu-certificate/wangsu_certificate_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("CERTIFICATEID: %v", fCertificateId), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ AccessKeyId: fAccessKeyId, AccessKeySecret: fAccessKeySecret, CertificateId: fCertificateId, @@ -64,7 +64,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/deployer/providers/webhook/webhook_test.go b/pkg/core/deployer/providers/webhook/webhook_test.go index e285b4449..ffa1bd262 100644 --- a/pkg/core/deployer/providers/webhook/webhook_test.go +++ b/pkg/core/deployer/providers/webhook/webhook_test.go @@ -52,7 +52,7 @@ func TestDeploy(t *testing.T) { fmt.Sprintf("WEBHOOKDATA: %v", fWebhookData), }, "\n")) - deployer, err := provider.NewDeployer(&provider.DeployerConfig{ + provider, err := provider.NewDeployer(&provider.DeployerConfig{ WebhookUrl: fWebhookUrl, WebhookData: fWebhookData, Method: "POST", @@ -68,7 +68,7 @@ func TestDeploy(t *testing.T) { fInputCertData, _ := os.ReadFile(fInputCertPath) fInputKeyData, _ := os.ReadFile(fInputKeyPath) - res, err := deployer.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) + res, err := provider.Deploy(context.Background(), string(fInputCertData), string(fInputKeyData)) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/dingtalkbot/dingtalkbot_test.go b/pkg/core/notifier/providers/dingtalkbot/dingtalkbot_test.go index 96a538c20..60df101de 100644 --- a/pkg/core/notifier/providers/dingtalkbot/dingtalkbot_test.go +++ b/pkg/core/notifier/providers/dingtalkbot/dingtalkbot_test.go @@ -44,7 +44,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("SECRET: %v", fSecret), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ WebhookUrl: fWebhookUrl, Secret: fSecret, }) @@ -53,7 +53,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/discordbot/discordbot_test.go b/pkg/core/notifier/providers/discordbot/discordbot_test.go index 41476bd09..26c31cb8e 100644 --- a/pkg/core/notifier/providers/discordbot/discordbot_test.go +++ b/pkg/core/notifier/providers/discordbot/discordbot_test.go @@ -44,7 +44,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("CHANNELID: %v", fChannelId), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ BotToken: fApiToken, ChannelId: fChannelId, }) @@ -53,7 +53,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/email/email_test.go b/pkg/core/notifier/providers/email/email_test.go index 17069a204..af89e37a3 100644 --- a/pkg/core/notifier/providers/email/email_test.go +++ b/pkg/core/notifier/providers/email/email_test.go @@ -64,7 +64,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("RECEIVERADDRESS: %v", fReceiverAddress), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ SmtpHost: fSmtpHost, SmtpPort: int32(fSmtpPort), SmtpTls: fSmtpTLS, @@ -78,7 +78,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/larkbot/larkbot_test.go b/pkg/core/notifier/providers/larkbot/larkbot_test.go index 8664a095d..47a7f51bc 100644 --- a/pkg/core/notifier/providers/larkbot/larkbot_test.go +++ b/pkg/core/notifier/providers/larkbot/larkbot_test.go @@ -44,7 +44,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("SECRET: %v", fSecret), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ WebhookUrl: fWebhookUrl, Secret: fSecret, }) @@ -53,7 +53,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/mattermost/mattermost_test.go b/pkg/core/notifier/providers/mattermost/mattermost_test.go index 1a5379b2a..89d27f0ba 100644 --- a/pkg/core/notifier/providers/mattermost/mattermost_test.go +++ b/pkg/core/notifier/providers/mattermost/mattermost_test.go @@ -52,7 +52,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("PASSWORD: %v", fPassword), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ ServerUrl: fServerUrl, ChannelId: fChannelId, Username: fUsername, @@ -63,7 +63,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/slackbot/slackbot_test.go b/pkg/core/notifier/providers/slackbot/slackbot_test.go index 489597d50..dda373acc 100644 --- a/pkg/core/notifier/providers/slackbot/slackbot_test.go +++ b/pkg/core/notifier/providers/slackbot/slackbot_test.go @@ -44,7 +44,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("CHANNELID: %v", fChannelId), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ BotToken: fApiToken, ChannelId: fChannelId, }) @@ -53,7 +53,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/telegrambot/telegrambot_test.go b/pkg/core/notifier/providers/telegrambot/telegrambot_test.go index 3ec7b79d6..60b1fa364 100644 --- a/pkg/core/notifier/providers/telegrambot/telegrambot_test.go +++ b/pkg/core/notifier/providers/telegrambot/telegrambot_test.go @@ -44,7 +44,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("CHATID: %v", fChatId), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ BotToken: fApiToken, ChatId: fChatId, }) @@ -53,7 +53,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/webhook/webhook_test.go b/pkg/core/notifier/providers/webhook/webhook_test.go index b611f67a9..a7ab122cf 100644 --- a/pkg/core/notifier/providers/webhook/webhook_test.go +++ b/pkg/core/notifier/providers/webhook/webhook_test.go @@ -43,7 +43,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("URL: %v", fWebhookUrl), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ WebhookUrl: fWebhookUrl, Method: "POST", Headers: map[string]string{ @@ -56,7 +56,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return diff --git a/pkg/core/notifier/providers/wecombot/wecombot_test.go b/pkg/core/notifier/providers/wecombot/wecombot_test.go index 941b5a1e5..76943562c 100644 --- a/pkg/core/notifier/providers/wecombot/wecombot_test.go +++ b/pkg/core/notifier/providers/wecombot/wecombot_test.go @@ -38,7 +38,7 @@ func TestNotify(t *testing.T) { fmt.Sprintf("WEBHOOKURL: %v", fWebhookUrl), }, "\n")) - notifier, err := provider.NewNotifier(&provider.NotifierConfig{ + provider, err := provider.NewNotifier(&provider.NotifierConfig{ WebhookUrl: fWebhookUrl, }) if err != nil { @@ -46,7 +46,7 @@ func TestNotify(t *testing.T) { return } - res, err := notifier.Notify(context.Background(), mockSubject, mockMessage) + res, err := provider.Notify(context.Background(), mockSubject, mockMessage) if err != nil { t.Errorf("err: %+v", err) return