mirror of
https://github.com/woodchen-ink/certimate.git
synced 2025-07-19 01:41:55 +08:00
test: improve example
This commit is contained in:
parent
6badc0f419
commit
f99dd4f89a
@ -36,7 +36,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v aliyun_alb_test.go -args \
|
||||
go test -v ./aliyun_alb_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNALB_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNALB_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNALB_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v aliyun_cdn_test.go -args \
|
||||
go test -v ./aliyun_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNCDN_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -36,7 +36,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v aliyun_clb_test.go -args \
|
||||
go test -v ./aliyun_clb_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNCLB_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNCLB_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNCLB_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v aliyun_dcdn_test.go -args \
|
||||
go test -v ./aliyun_dcdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNDCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNDCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNDCDN_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -36,7 +36,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v aliyun_nlb_test.go -args \
|
||||
go test -v ./aliyun_nlb_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNNLB_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNNLB_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNNLB_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -36,7 +36,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v aliyun_oss_test.go -args \
|
||||
go test -v ./aliyun_oss_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNOSS_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNOSS_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_ALIYUNOSS_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v baiducloud_cdn_test.go -args \
|
||||
go test -v ./baiducloud_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_BAIDUCLOUDCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_BAIDUCLOUDCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_BAIDUCLOUDCDN_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v byteplus_cdn_test.go -args \
|
||||
go test -v ./byteplus_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_BYTEPLUSCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_BYTEPLUSCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_BYTEPLUSCDN_ACCESSKEY="your-access-key" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v dogecloud_cdn_test.go -args \
|
||||
go test -v ./dogecloud_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_DOGECLOUDCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_DOGECLOUDCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_DOGECLOUDCDN_ACCESSKEY="your-access-key" \
|
||||
|
@ -34,7 +34,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v huaweicloud_cdn_test.go -args \
|
||||
go test -v ./huaweicloud_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_HUAWEICLOUDCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_HUAWEICLOUDCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_HUAWEICLOUDCDN_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -38,7 +38,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v huaweicloud_elb_test.go -args \
|
||||
go test -v ./huaweicloud_elb_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_HUAWEICLOUDELB_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_HUAWEICLOUDELB_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_HUAWEICLOUDELB_ACCESSKEYID="your-access-key-id" \
|
||||
|
@ -34,7 +34,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v k8s_secret_test.go -args \
|
||||
go test -v ./k8s_secret_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_K8SSECRET_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_K8SSECRET_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_K8SSECRET_NAMESPACE="default" \
|
||||
|
@ -38,7 +38,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v local_test.go -args \
|
||||
go test -v ./local_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_LOCAL_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_LOCAL_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_LOCAL_OUTPUTCERTPATH="/path/to/your-output-cert" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v qiniu_cdn_test.go -args \
|
||||
go test -v ./qiniu_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_QINIUCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_QINIUCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_QINIUCDN_ACCESSKEY="your-access-key" \
|
||||
|
@ -38,7 +38,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v ssh_test.go -args \
|
||||
go test -v ./ssh_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_SSH_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_SSH_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_SSH_SSHHOST="localhost" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v tencentcloud_cdn_test.go -args \
|
||||
go test -v ./tencentcloud_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCDN_SECRETID="your-secret-id" \
|
||||
|
@ -38,7 +38,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v tencentcloud_clb_test.go -args \
|
||||
go test -v ./tencentcloud_clb_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCLB_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCLB_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCLB_SECRETID="your-secret-id" \
|
||||
|
@ -36,7 +36,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v tencentcloud_cos_test.go -args \
|
||||
go test -v ./tencentcloud_cos_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCOS_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCOS_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDCOS_SECRETID="your-secret-id" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v tencentcloud_ecdn_test.go -args \
|
||||
go test -v ./tencentcloud_ecdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDECDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDECDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDECDN_SECRETID="your-secret-id" \
|
||||
|
@ -21,7 +21,7 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
argsPrefix := "CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_"
|
||||
argsPrefix := "CERTIMATE_DEPLOYER_TENCENTCLOUDEO_"
|
||||
|
||||
flag.StringVar(&fInputCertPath, argsPrefix+"INPUTCERTPATH", "", "")
|
||||
flag.StringVar(&fInputKeyPath, argsPrefix+"INPUTKEYPATH", "", "")
|
||||
@ -34,13 +34,13 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v tencentcloud_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_SECRETID="your-secret-id" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_SECRETKEY="your-secret-key" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_ZONEID="your-zone-id" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEEO_DOMAIN="example.com"
|
||||
go test -v ./tencentcloud_eo_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEO_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEO_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEO_SECRETID="your-secret-id" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEO_SECRETKEY="your-secret-key" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEO_ZONEID="your-zone-id" \
|
||||
--CERTIMATE_DEPLOYER_TENCENTCLOUDEO_DOMAIN="example.com"
|
||||
*/
|
||||
func TestDeploy(t *testing.T) {
|
||||
flag.Parse()
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v volcengine_cdn_test.go -args \
|
||||
go test -v ./volcengine_cdn_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_VOLCENGINECDN_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_VOLCENGINECDN_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_VOLCENGINECDN_ACCESSKEY="your-access-key" \
|
||||
|
@ -32,7 +32,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v volcengine_live_test.go -args \
|
||||
go test -v ./volcengine_live_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_VOLCENGINELIVE_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_VOLCENGINELIVE_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_VOLCENGINELIVE_ACCESSKEY="your-access-key" \
|
||||
|
@ -30,7 +30,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v webhook_test.go -args \
|
||||
go test -v ./webhook_test.go -args \
|
||||
--CERTIMATE_DEPLOYER_WEBHOOK_INPUTCERTPATH="/path/to/your-input-cert.pem" \
|
||||
--CERTIMATE_DEPLOYER_WEBHOOK_INPUTKEYPATH="/path/to/your-input-key.pem" \
|
||||
--CERTIMATE_DEPLOYER_WEBHOOK_URL="https://example.com/your-webhook-url" \
|
||||
|
@ -9,7 +9,7 @@ import (
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v logger_test.go
|
||||
go test -v ./logger_test.go
|
||||
*/
|
||||
func TestLogger(t *testing.T) {
|
||||
t.Run("Logger_Appendt", func(t *testing.T) {
|
||||
|
@ -30,7 +30,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v bark_test.go -args \
|
||||
go test -v ./bark_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_BARK_SERVERURL="https://example.com/your-server-url" \
|
||||
--CERTIMATE_NOTIFIER_BARK_DEVICEKEY="your-device-key"
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v dingtalk_test.go -args \
|
||||
go test -v ./dingtalk_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_DINGTALK_URL="https://example.com/your-webhook-url"
|
||||
*/
|
||||
func TestNotify(t *testing.T) {
|
||||
|
@ -40,7 +40,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v email_test.go -args \
|
||||
go test -v ./email_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_EMAIL_SMTPHOST="smtp.example.com" \
|
||||
--CERTIMATE_NOTIFIER_EMAIL_SMTPPORT=465 \
|
||||
--CERTIMATE_NOTIFIER_EMAIL_SMTPTLS=true \
|
||||
|
@ -26,7 +26,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v lark_test.go -args \
|
||||
go test -v ./lark_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_LARK_WEBHOOKURL="https://example.com/your-webhook-url"
|
||||
*/
|
||||
func TestNotify(t *testing.T) {
|
||||
|
@ -26,7 +26,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v serverchan_test.go -args \
|
||||
go test -v ./serverchan_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_SERVERCHAN_URL="https://example.com/your-webhook-url" \
|
||||
*/
|
||||
func TestNotify(t *testing.T) {
|
||||
|
@ -30,7 +30,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v telegram_test.go -args \
|
||||
go test -v ./telegram_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_TELEGRAM_APITOKEN="your-api-token" \
|
||||
--CERTIMATE_NOTIFIER_TELEGRAM_CHATID=123456
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v webhook_test.go -args \
|
||||
go test -v ./webhook_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_WEBHOOK_URL="https://example.com/your-webhook-url"
|
||||
*/
|
||||
func TestNotify(t *testing.T) {
|
||||
|
@ -26,7 +26,7 @@ func init() {
|
||||
/*
|
||||
Shell command to run this test:
|
||||
|
||||
go test -v serverchan_test.go -args \
|
||||
go test -v ./wecom_test.go -args \
|
||||
--CERTIMATE_NOTIFIER_WECOM_WEBHOOKURL="https://example.com/your-webhook-url" \
|
||||
*/
|
||||
func TestNotify(t *testing.T) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user