mirror of
https://github.com/certimate-go/certimate.git
synced 2026-09-24 23:10:13 +08:00
test: testify assertions
This commit is contained in:
@@ -1,127 +1,120 @@
|
||||
package expr
|
||||
package expr_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/certimate-go/certimate/internal/domain/expr"
|
||||
)
|
||||
|
||||
func TestLogicalEval(t *testing.T) {
|
||||
// 测试逻辑表达式 and
|
||||
logicalExpr := LogicalExpr{
|
||||
Left: ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
Operator: And,
|
||||
Right: ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
}
|
||||
result, err := logicalExpr.Eval(nil)
|
||||
if err != nil {
|
||||
t.Errorf("failed to evaluate logical expression: %v", err)
|
||||
}
|
||||
if result.Value != true {
|
||||
t.Errorf("expected true, got %v", result)
|
||||
}
|
||||
|
||||
// 测试逻辑表达式 or
|
||||
orExpr := LogicalExpr{
|
||||
Left: ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
Operator: Or,
|
||||
Right: ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
}
|
||||
result, err = orExpr.Eval(nil)
|
||||
if err != nil {
|
||||
t.Errorf("failed to evaluate logical expression: %v", err)
|
||||
}
|
||||
if result.Value != true {
|
||||
t.Errorf("expected true, got %v", result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUnmarshalExpr(t *testing.T) {
|
||||
type args struct {
|
||||
type testInput struct {
|
||||
data []byte
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want Expr
|
||||
wantErr bool
|
||||
testCases := []struct {
|
||||
name string
|
||||
input testInput
|
||||
expected *expr.Expr
|
||||
expectedErr bool
|
||||
}{
|
||||
{
|
||||
name: "test1",
|
||||
args: args{
|
||||
data: []byte(`{"left":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.validity","type":"boolean"},"type":"var"},"operator":"is","right":{"type":"const","value":true,"valueType":"boolean"},"type":"comparison"},"operator":"and","right":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.daysLeft","type":"number"},"type":"var"},"operator":"eq","right":{"type":"const","value":2,"valueType":"number"},"type":"comparison"},"type":"logical"}`),
|
||||
name: "case1",
|
||||
input: testInput{
|
||||
data: []byte(`{"left":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.validity","type":"boolean"},"type":"var"},"operator":"eq","right":{"type":"const","value":"true","valueType":"boolean"},"type":"comparison"},"operator":"and","right":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.daysLeft","type":"number"},"type":"var"},"operator":"eq","right":{"type":"const","value":"2","valueType":"number"},"type":"comparison"},"type":"logical"}`),
|
||||
},
|
||||
expectedErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
got, err := UnmarshalExpr(tt.args.data)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("UnmarshalExpr() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if got == nil {
|
||||
t.Errorf("UnmarshalExpr() got = nil, want %v", tt.want)
|
||||
return
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
_, err := expr.UnmarshalExpr(tc.input.data)
|
||||
if tc.expectedErr {
|
||||
assert.Error(t, err, "Case: %-20s", tc.name)
|
||||
} else {
|
||||
assert.NoError(t, err, "Case: %-20s", tc.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestExpr_Eval(t *testing.T) {
|
||||
type args struct {
|
||||
variables map[string]map[string]any
|
||||
func TestEvalExpr(t *testing.T) {
|
||||
type testInput struct {
|
||||
data []byte
|
||||
variables map[string]map[string]any
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want *EvalResult
|
||||
wantErr bool
|
||||
testCases := []struct {
|
||||
name string
|
||||
input testInput
|
||||
expected *expr.EvalResult
|
||||
expectedErr bool
|
||||
}{
|
||||
{
|
||||
name: "test1",
|
||||
args: args{
|
||||
name: "case1",
|
||||
input: testInput{
|
||||
data: []byte(`{"left":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.validity","type":"boolean"},"type":"var"},"operator":"eq","right":{"type":"const","value":"true","valueType":"boolean"},"type":"comparison"},"operator":"and","right":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.daysLeft","type":"number"},"type":"var"},"operator":"eq","right":{"type":"const","value":"2","valueType":"number"},"type":"comparison"},"type":"logical"}`),
|
||||
variables: map[string]map[string]any{
|
||||
"ODnYSOXB6HQP2_vz6JcZE": {
|
||||
"certificate.validity": true,
|
||||
"certificate.daysLeft": 2,
|
||||
"certificate.validity": "true",
|
||||
"certificate.daysLeft": "2",
|
||||
},
|
||||
},
|
||||
data: []byte(`{"left":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.validity","type":"boolean"},"type":"var"},"operator":"is","right":{"type":"const","value":true,"valueType":"boolean"},"type":"comparison"},"operator":"and","right":{"left":{"selector":{"id":"ODnYSOXB6HQP2_vz6JcZE","name":"certificate.daysLeft","type":"number"},"type":"var"},"operator":"eq","right":{"type":"const","value":2,"valueType":"number"},"type":"comparison"},"type":"logical"}`),
|
||||
},
|
||||
expectedErr: false,
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
c, err := UnmarshalExpr(tt.args.data)
|
||||
if err != nil {
|
||||
t.Errorf("UnmarshalExpr() error = %v", err)
|
||||
return
|
||||
}
|
||||
got, err := c.Eval(tt.args.variables)
|
||||
t.Log("got:", got)
|
||||
if (err != nil) != tt.wantErr {
|
||||
t.Errorf("ConstExpr.Eval() error = %v, wantErr %v", err, tt.wantErr)
|
||||
return
|
||||
}
|
||||
if got.Value != true {
|
||||
t.Errorf("ConstExpr.Eval() got = %v, want %v", got.Value, true)
|
||||
for _, tc := range testCases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
temp, err := expr.UnmarshalExpr(tc.input.data)
|
||||
assert.NoError(t, err, "failed to unmarshal expression")
|
||||
|
||||
result, err := temp.Eval(tc.input.variables)
|
||||
if tc.expectedErr {
|
||||
assert.Error(t, err, "Case: %-20s", tc.name)
|
||||
} else {
|
||||
assert.NoError(t, err, "Case: %-20s", tc.name)
|
||||
assert.True(t, result.Value.(bool))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestEvalLogicalExpr(t *testing.T) {
|
||||
t.Run("And", func(t *testing.T) {
|
||||
logicalExpr := expr.LogicalExpr{
|
||||
Left: expr.ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
Operator: expr.And,
|
||||
Right: expr.ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
}
|
||||
result, err := logicalExpr.Eval(nil)
|
||||
assert.NoError(t, err, "failed to evaluate logical expression")
|
||||
assert.True(t, result.Value.(bool))
|
||||
})
|
||||
|
||||
t.Run("Or", func(t *testing.T) {
|
||||
orExpr := expr.LogicalExpr{
|
||||
Left: expr.ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
Operator: expr.Or,
|
||||
Right: expr.ConstantExpr{
|
||||
Type: "const",
|
||||
Value: "true",
|
||||
ValueType: "boolean",
|
||||
},
|
||||
}
|
||||
result, err := orExpr.Eval(nil)
|
||||
assert.NoError(t, err, "failed to evaluate logical expression")
|
||||
assert.True(t, result.Value.(bool))
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package onepanelssl_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/1panel"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("1PANEL_")
|
||||
fp = it.Args("1PANEL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
ApiVersion: fApiVersion,
|
||||
ApiKey: fApiKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyuncas_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/aliyun-cas"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNCAS_")
|
||||
fp = it.Args("ALIYUNCAS_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeySecret: fAccessKeySecret,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
package aliyunslb_test
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/aliyun-slb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNSLB_")
|
||||
fp = it.Args("ALIYUNSLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -40,25 +40,13 @@ func TestProvider(t *testing.T) {
|
||||
fp.Parse()
|
||||
|
||||
t.Run("Upload", func(t *testing.T) {
|
||||
t.Log(strings.Join([]string{
|
||||
"args:",
|
||||
fmt.Sprintf("TESTCERTPATH: %v", fTestCertPath),
|
||||
fmt.Sprintf("TESTKEYPATH: %v", fTestKeyPath),
|
||||
fmt.Sprintf("ACCESSKEYID: %v", fAccessKeyId),
|
||||
fmt.Sprintf("ACCESSKEYSECRET: %v", fAccessKeySecret),
|
||||
fmt.Sprintf("REGION: %v", fRegion),
|
||||
}, "\n"))
|
||||
|
||||
provider, err := impl.NewCertmgr(&impl.CertmgrConfig{
|
||||
AccessKeyId: fAccessKeyId,
|
||||
AccessKeySecret: fAccessKeySecret,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsacm_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/aws-acm"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSACM_")
|
||||
fp = it.Args("AWSACM_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsiam_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/aws-iam"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSIAM_")
|
||||
fp = it.Args("AWSIAM_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package azurekeyvault_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/azure-keyvault"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AZUREKEYVAULT_")
|
||||
fp = it.Args("AZUREKEYVAULT_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fTenantId string
|
||||
@@ -51,11 +53,8 @@ func TestProvider(t *testing.T) {
|
||||
CloudName: fCloudName,
|
||||
KeyVaultName: fKeyVaultName,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baiducloudcert_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/baiducloud-cert"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAIDUCLOUDCERT_")
|
||||
fp = it.Args("BAIDUCLOUDCERT_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baishancdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/baishan-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAISHANCDN_")
|
||||
fp = it.Args("BAISHANCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiToken string
|
||||
@@ -35,11 +37,8 @@ func TestProvider(t *testing.T) {
|
||||
provider, err := impl.NewCertmgr(&impl.CertmgrConfig{
|
||||
ApiToken: fApiToken,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package bytepluscdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/byteplus-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSCDN_")
|
||||
fp = it.Args("BYTEPLUSCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package bytepluscertcenter_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/byteplus-certcenter"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSCERTCENTER_")
|
||||
fp = it.Args("BYTEPLUSCERTCENTER_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package byteplusmedialive_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/byteplus-medialive"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSMEDIALIVE_")
|
||||
fp = it.Args("BYTEPLUSMEDIALIVE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cmcccloudvlb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/cmcccloud-vlb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CMCCCLOUDVLB_")
|
||||
fp = it.Args("CMCCCLOUDVLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
PoolId: fPoolId,
|
||||
IsDefault: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudao_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ctcccloud-ao"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDAO_")
|
||||
fp = it.Args("CTCCCLOUDAO_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudcdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ctcccloud-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDCDN_")
|
||||
fp = it.Args("CTCCCLOUDCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudcms_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ctcccloud-cms"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDCMS_")
|
||||
fp = it.Args("CTCCCLOUDCMS_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudelb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ctcccloud-elb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDELB_")
|
||||
fp = it.Args("CTCCCLOUDELB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
RegionId: fRegionId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudicdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ctcccloud-icdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDICDN_")
|
||||
fp = it.Args("CTCCCLOUDICDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudlvdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ctcccloud-lvdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDLVDN_")
|
||||
fp = it.Args("CTCCCLOUDLVDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
+6
-7
@@ -3,12 +3,14 @@ package digitaloceancertificate_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/digitalocean-certificate"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("DIGITALOCEANCERTIFICATE_")
|
||||
fp = it.Args("DIGITALOCEANCERTIFICATE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessToken string
|
||||
@@ -35,11 +37,8 @@ func TestProvider(t *testing.T) {
|
||||
provider, err := impl.NewCertmgr(&impl.CertmgrConfig{
|
||||
AccessToken: fAccessToken,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package dogecloud_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/dogecloud"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("DOGECLOUD_")
|
||||
fp = it.Args("DOGECLOUD_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKey string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKey: fAccessKey,
|
||||
SecretKey: fSecretKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package dokploy_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/dokploy"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("DOKPLOY_")
|
||||
fp = it.Args("DOKPLOY_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -40,11 +42,8 @@ func TestProvider(t *testing.T) {
|
||||
ApiKey: fApiKey,
|
||||
AllowInsecureConnections: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package gcorecdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/gcore-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("GCORECDN_")
|
||||
fp = it.Args("GCORECDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiToken string
|
||||
@@ -35,11 +37,8 @@ func TestProvider(t *testing.T) {
|
||||
provider, err := impl.NewCertmgr(&impl.CertmgrConfig{
|
||||
ApiToken: fApiToken,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
+6
-7
@@ -4,12 +4,14 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/googlecloud-certificatemanager"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("GOOGLECLOUDCERTIFICATEMANAGER_")
|
||||
fp = it.Args("GOOGLECLOUDCERTIFICATEMANAGER_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fProjectId string
|
||||
@@ -45,11 +47,8 @@ func TestProvider(t *testing.T) {
|
||||
ProjectId: fProjectId,
|
||||
ServiceAccountKey: fServiceAccountKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package huaweicloudelb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/huaweicloud-elb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("HUAWEICLOUDELB_")
|
||||
fp = it.Args("HUAWEICLOUDELB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package huaweicloudscm_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/huaweicloud-scm"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("HUAWEICLOUDSCM_")
|
||||
fp = it.Args("HUAWEICLOUDSCM_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package huaweicloudwaf_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/huaweicloud-waf"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("HUAWEICLOUDWAF_")
|
||||
fp = it.Args("HUAWEICLOUDWAF_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package jdcloudssl_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/jdcloud-ssl"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("JDCLOUDSSL_")
|
||||
fp = it.Args("JDCLOUDSSL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
AccessKeySecret: fAccessKeySecret,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ksyunkcm_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ksyun-kcm"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("KSYUNKCM_")
|
||||
fp = it.Args("KSYUNKCM_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ksyunslb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ksyun-slb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("KSYUNSLB_")
|
||||
fp = it.Args("KSYUNSLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package nginxproxymanager_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/nginxproxymanager"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("NGINXPROXYMANAGER_")
|
||||
fp = it.Args("NGINXPROXYMANAGER_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -45,11 +47,8 @@ func TestProvider(t *testing.T) {
|
||||
Password: fPassword,
|
||||
AllowInsecureConnections: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
+6
-7
@@ -3,12 +3,14 @@ package oraclecloudcertificatesmgmt_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/oraclecloud-certificatesmgmt"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ORACLECLOUDCERTIFICATESMGMT_")
|
||||
fp = it.Args("ORACLECLOUDCERTIFICATESMGMT_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fPrivateKey string
|
||||
@@ -56,11 +58,8 @@ func TestProvider(t *testing.T) {
|
||||
UserOcid: fUserOcid,
|
||||
CompartmentOcid: fCompartmentOcid,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package qingcloudlb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/qingcloud-lb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("QINGCLOUDLB_")
|
||||
fp = it.Args("QINGCLOUDLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
ZoneId: fZoneId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package qiniusslcert_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/qiniu-sslcert"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("QINIUSSLCERT_")
|
||||
fp = it.Args("QINIUSSLCERT_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKey string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKey: fAccessKey,
|
||||
SecretKey: fSecretKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package rainyunsslcenter_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/rainyun-sslcenter"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("RAINYUNSSLCENTER_")
|
||||
fp = it.Args("RAINYUNSSLCENTER_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiKey string
|
||||
@@ -35,11 +37,8 @@ func TestProvider(t *testing.T) {
|
||||
provider, err := impl.NewCertmgr(&impl.CertmgrConfig{
|
||||
ApiKey: fApiKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package tencentcloudgaap_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/tencentcloud-gaap"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("TENCENTCLOUDGAAP_")
|
||||
fp = it.Args("TENCENTCLOUDGAAP_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fSecretId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretId: fSecretId,
|
||||
SecretKey: fSecretKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package tencentcloudssl_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/tencentcloud-ssl"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("TENCENTCLOUDSSL_")
|
||||
fp = it.Args("TENCENTCLOUDSSL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fSecretId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretId: fSecretId,
|
||||
SecretKey: fSecretKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package tencentcloudtse_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/tencentcloud-tse"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("TENCENTCLOUDTSE_")
|
||||
fp = it.Args("TENCENTCLOUDTSE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fSecretId string
|
||||
@@ -51,11 +53,8 @@ func TestProvider(t *testing.T) {
|
||||
ServiceType: fServiceType,
|
||||
GatewayId: fGatewayId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ucloudulb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ucloud-ulb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("UCLOUDULB_")
|
||||
fp = it.Args("UCLOUDULB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fPrivateKey string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
PublicKey: fPublicKey,
|
||||
Region: fRegion,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ucloudulb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ucloud-upathx"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("UCLOUDUPATHX_")
|
||||
fp = it.Args("UCLOUDUPATHX_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fPrivateKey string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
PrivateKey: fPrivateKey,
|
||||
PublicKey: fPublicKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ucloudussl_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/ucloud-ussl"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("UCLOUDUSSL_")
|
||||
fp = it.Args("UCLOUDUSSL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fPrivateKey string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
PrivateKey: fPrivateKey,
|
||||
PublicKey: fPublicKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package upyunssl_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/upyun-ssl"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("UPYUNSSL_")
|
||||
fp = it.Args("UPYUNSSL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fUsername string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
Username: fUsername,
|
||||
Password: fPassword,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package volcenginecdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/volcengine-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("VOLCENGINECDN_")
|
||||
fp = it.Args("VOLCENGINECDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package volcenginecertcenter_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/volcengine-certcenter"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("VOLCENGINECERTCENTER_")
|
||||
fp = it.Args("VOLCENGINECERTCENTER_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package volcenginelive_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/volcengine-live"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("VOLCENGINELIVE_")
|
||||
fp = it.Args("VOLCENGINELIVE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package wangsucertificate_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/wangsu-certificate"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("WANGSUCERTIFICATE_")
|
||||
fp = it.Args("WANGSUCERTIFICATE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
AccessKeySecret: fAccessKeySecret,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
+6
-7
@@ -4,12 +4,14 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/yandexcloud-certificatemanager"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("YANDEXCLOUDCERTIFICATEMANAGER_")
|
||||
fp = it.Args("YANDEXCLOUDCERTIFICATEMANAGER_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fFolderId string
|
||||
@@ -45,11 +47,8 @@ func TestProvider(t *testing.T) {
|
||||
FolderId: fFolderId,
|
||||
ServiceAccountKey: fServiceAccountKey,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package zenlayercdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/zenlayer-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ZENLAYERCDN_")
|
||||
fp = it.Args("ZENLAYERCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
AccessKeyPassword: fAccessKeyPassword,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package zenlayerga_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/certmgr/providers/zenlayer-ga"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/certmgr/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ZENLAYERGA_")
|
||||
fp = it.Args("ZENLAYERGA_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -39,11 +41,8 @@ func TestProvider(t *testing.T) {
|
||||
AccessKeyId: fAccessKeyId,
|
||||
AccessKeyPassword: fAccessKeyPassword,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestUpload(t, provider, tester.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestUpload(t, provider, it.TestUploadArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package testing
|
||||
|
||||
import (
|
||||
tester "github.com/certimate-go/certimate/pkg/core/internal/testing"
|
||||
"github.com/certimate-go/certimate/pkg/core/internal/testing"
|
||||
)
|
||||
|
||||
func Args(prefix string) tester.ArgsParser {
|
||||
return tester.Args(prefix)
|
||||
func Args(prefix string) testing.ArgsParser {
|
||||
return testing.Args(prefix)
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ import (
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/certimate-go/certimate/pkg/core/certmgr"
|
||||
)
|
||||
|
||||
@@ -29,16 +32,16 @@ func TestUpload(t *testing.T, testProvider certmgr.Provider, testArgs TestUpload
|
||||
ctx := context.Background()
|
||||
certData, _ := os.ReadFile(testArgs.CertPath)
|
||||
privkeyData, _ := os.ReadFile(testArgs.KeyPath)
|
||||
assert.NotNil(t, certData)
|
||||
assert.NotNil(t, privkeyData)
|
||||
|
||||
logger := slog.Default()
|
||||
logger.Enabled(ctx, slog.LevelDebug)
|
||||
testProvider.SetLogger(logger)
|
||||
|
||||
res, err := testProvider.Upload(ctx, string(certData), string(privkeyData))
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
|
||||
resjson, _ := json.Marshal(res)
|
||||
t.Logf("ok: %s", string(resjson))
|
||||
|
||||
@@ -3,12 +3,14 @@ package onepanelconsole_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/1panel-console"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("1PANELCONSOLE_")
|
||||
fp = it.Args("1PANELCONSOLE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -45,11 +47,8 @@ func TestProvider(t *testing.T) {
|
||||
AllowInsecureConnections: true,
|
||||
AutoRestart: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package onepanel_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/1panel"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("1PANEL_")
|
||||
fp = it.Args("1PANEL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -53,12 +55,9 @@ func TestProvider(t *testing.T) {
|
||||
WebsiteMatchPattern: impl.WEBSITE_MATCH_PATTERN_SPECIFIED,
|
||||
WebsiteId: fWebsiteId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
|
||||
t.Run("Deploy_ToCertificate", func(t *testing.T) {
|
||||
@@ -70,11 +69,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_CERTIFICATE,
|
||||
CertificateId: fCertificateId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunalb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-alb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNALB_")
|
||||
fp = it.Args("ALIYUNALB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -55,12 +57,9 @@ func TestProvider(t *testing.T) {
|
||||
LoadbalancerId: fLoadbalancerId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
|
||||
t.Run("Deploy_ToListener", func(t *testing.T) {
|
||||
@@ -72,11 +71,8 @@ func TestProvider(t *testing.T) {
|
||||
ListenerId: fListenerId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunapigw_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-apigw"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNAPIGW_")
|
||||
fp = it.Args("ALIYUNAPIGW_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -60,11 +62,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyuncdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNCDN_")
|
||||
fp = it.Args("ALIYUNCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunclb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-clb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNCLB_")
|
||||
fp = it.Args("ALIYUNCLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -55,12 +57,9 @@ func TestProvider(t *testing.T) {
|
||||
LoadbalancerId: fLoadbalancerId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
|
||||
t.Run("Deploy_ToListener", func(t *testing.T) {
|
||||
@@ -73,11 +72,8 @@ func TestProvider(t *testing.T) {
|
||||
ListenerPort: int32(fListenerPort),
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyundcdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-dcdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNDCDN_")
|
||||
fp = it.Args("ALIYUNDCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunddospro_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-ddospro"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNDDOSPRO_")
|
||||
fp = it.Args("ALIYUNDDOSPRO_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunesasaas_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-esa-saas"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNESASAAS_")
|
||||
fp = it.Args("ALIYUNESASAAS_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -52,11 +54,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunesa_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-esa"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNESA_")
|
||||
fp = it.Args("ALIYUNESA_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -47,11 +49,8 @@ func TestProvider(t *testing.T) {
|
||||
Region: fRegion,
|
||||
SiteId: fSiteId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunfc_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-fc"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNFC_")
|
||||
fp = it.Args("ALIYUNFC_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -49,11 +51,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunga_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-ga"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNGA_")
|
||||
fp = it.Args("ALIYUNGA_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -51,12 +53,9 @@ func TestProvider(t *testing.T) {
|
||||
AcceleratorId: fAcceleratorId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
|
||||
t.Run("Deploy_ToListener", func(t *testing.T) {
|
||||
@@ -67,11 +66,8 @@ func TestProvider(t *testing.T) {
|
||||
ListenerId: fListenerId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunlive_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-live"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNLIVE_")
|
||||
fp = it.Args("ALIYUNLIVE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunnlb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-nlb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNNLB_")
|
||||
fp = it.Args("ALIYUNNLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -51,12 +53,9 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_LOADBALANCER,
|
||||
LoadbalancerId: fLoadbalancerId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
|
||||
t.Run("Deploy_ToListener", func(t *testing.T) {
|
||||
@@ -67,11 +66,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_LISTENER,
|
||||
ListenerId: fListenerId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunoss_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-oss"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNOSS_")
|
||||
fp = it.Args("ALIYUNOSS_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -51,11 +53,8 @@ func TestProvider(t *testing.T) {
|
||||
Bucket: fBucket,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunvod_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-vod"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNVOD_")
|
||||
fp = it.Args("ALIYUNVOD_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package aliyunwaf_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aliyun-waf"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("ALIYUNWAF_")
|
||||
fp = it.Args("ALIYUNWAF_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -47,11 +49,8 @@ func TestProvider(t *testing.T) {
|
||||
Region: fRegion,
|
||||
InstanceId: fInstanceId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package apisix_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/apisix"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("APISIX_")
|
||||
fp = it.Args("APISIX_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -45,11 +47,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_CERTIFICATE,
|
||||
CertificateId: fCertificateId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsalb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aws-alb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSALB_")
|
||||
fp = it.Args("AWSALB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -52,11 +54,8 @@ func TestProvider(t *testing.T) {
|
||||
ListenerArn: fListenerArn,
|
||||
CertificateSource: impl.CERTIFICATE_SOURCE_ACM,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsamplify_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aws-amplify"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSAMPLIFY_")
|
||||
fp = it.Args("AWSAMPLIFY_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -51,11 +53,8 @@ func TestProvider(t *testing.T) {
|
||||
Domain: fDomain,
|
||||
CertificateSource: impl.CERTIFICATE_SOURCE_ACM,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsapigateway_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aws-apigateway"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSAPIGATEWAY_")
|
||||
fp = it.Args("AWSAPIGATEWAY_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
Domain: fDomain,
|
||||
CertificateSource: impl.CERTIFICATE_SOURCE_ACM,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsclb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aws-clb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSCLB_")
|
||||
fp = it.Args("AWSCLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -52,11 +54,8 @@ func TestProvider(t *testing.T) {
|
||||
LoadbalancerPort: int32(fLoadbalancerPort),
|
||||
CertificateSource: impl.CERTIFICATE_SOURCE_ACM,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awscloudfront_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aws-cloudfront"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSCLOUDFRONT_")
|
||||
fp = it.Args("AWSCLOUDFRONT_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DistributionId: fDistributionId,
|
||||
CertificateSource: impl.CERTIFICATE_SOURCE_ACM,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package awsnlb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/aws-nlb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("AWSNLB_")
|
||||
fp = it.Args("AWSNLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -52,11 +54,8 @@ func TestProvider(t *testing.T) {
|
||||
ListenerArn: fListenerArn,
|
||||
CertificateSource: impl.CERTIFICATE_SOURCE_ACM,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baiducloudappblb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baiducloud-appblb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAIDUCLOUDAPPBLB_")
|
||||
fp = it.Args("BAIDUCLOUDAPPBLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -52,11 +54,8 @@ func TestProvider(t *testing.T) {
|
||||
LoadbalancerId: fLoadbalancerId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baiducloudblb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baiducloud-blb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAIDUCLOUDBLB_")
|
||||
fp = it.Args("BAIDUCLOUDBLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -52,11 +54,8 @@ func TestProvider(t *testing.T) {
|
||||
LoadbalancerId: fLoadbalancerId,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baiducloudcdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baiducloud-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAIDUCLOUDCDN_")
|
||||
fp = it.Args("BAIDUCLOUDCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baishancdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baishan-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAISHANCDN_")
|
||||
fp = it.Args("BAISHANCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiToken string
|
||||
@@ -40,11 +42,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baotapanelconsole_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baotapanel-console"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAOTAPANELCONSOLE_")
|
||||
fp = it.Args("BAOTAPANELCONSOLE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -41,11 +43,8 @@ func TestProvider(t *testing.T) {
|
||||
AllowInsecureConnections: true,
|
||||
AutoRestart: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baotapanel_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baotapanel"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAOTAPANEL_")
|
||||
fp = it.Args("BAOTAPANEL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
SiteType: fSiteType,
|
||||
SiteNames: []string{fSiteName},
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baotapanelgoconsole_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baotapanelgo-console"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAOTAPANELGOCONSOLE_")
|
||||
fp = it.Args("BAOTAPANELGOCONSOLE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -40,11 +42,8 @@ func TestProvider(t *testing.T) {
|
||||
ApiKey: fApiKey,
|
||||
AllowInsecureConnections: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baotapanelgo_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baotapanelgo"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAOTAPANELGO_")
|
||||
fp = it.Args("BAOTAPANELGO_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
SiteType: fSiteType,
|
||||
SiteNames: []string{fSiteName},
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baotapanelconsole_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baotawaf-console"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAOTAWAFCONSOLE_")
|
||||
fp = it.Args("BAOTAWAFCONSOLE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -42,11 +44,8 @@ func TestProvider(t *testing.T) {
|
||||
ApiKey: fApiKey,
|
||||
AllowInsecureConnections: true,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package baotawaf_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/baotawaf"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BAOTAWAF_")
|
||||
fp = it.Args("BAOTAWAF_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
SiteNames: []string{fSiteName},
|
||||
SitePort: int32(fSitePort),
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package bunnycdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/bunny-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BUNNYCDN_")
|
||||
fp = it.Args("BUNNYCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiKey string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
PullZoneId: fPullZoneId,
|
||||
Hostname: fHostName,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package byteplusalb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/byteplus-alb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSALB_")
|
||||
fp = it.Args("BYTEPLUSALB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_LISTENER,
|
||||
ListenerId: fListenerId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package byteplusapig_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/byteplus-apig"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSAPIG_")
|
||||
fp = it.Args("BYTEPLUSAPIG_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package bytepluscdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/byteplus-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSCDN_")
|
||||
fp = it.Args("BYTEPLUSCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
SecretAccessKey: fSecretAccessKey,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package byteplusclb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/byteplus-clb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSCLB_")
|
||||
fp = it.Args("BYTEPLUSCLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -48,11 +50,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_LISTENER,
|
||||
ListenerId: fListenerId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package byteplusmedialive_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/byteplus-medialive"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSMEDIALIVE_")
|
||||
fp = it.Args("BYTEPLUSMEDIALIVE_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package byteplustos_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/byteplus-tos"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("BYTEPLUSTOS_")
|
||||
fp = it.Args("BYTEPLUSTOS_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -51,11 +53,8 @@ func TestProvider(t *testing.T) {
|
||||
Bucket: fBucket,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cachefly_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/cachefly"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CACHEFLY_")
|
||||
fp = it.Args("CACHEFLY_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiToken string
|
||||
@@ -35,11 +37,8 @@ func TestProvider(t *testing.T) {
|
||||
provider, err := impl.NewDeployer(&impl.DeployerConfig{
|
||||
ApiToken: fApiToken,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cdnfly_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/cdnfly"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CDNFLY_")
|
||||
fp = it.Args("CDNFLY_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -49,11 +51,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_CERTIFICATE,
|
||||
CertificateId: fCertificateId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cloudflaressl_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/cloudflare-ssl"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CLOUDFLARESSL_")
|
||||
fp = it.Args("CLOUDFLARESSL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fApiToken string
|
||||
@@ -43,11 +45,8 @@ func TestProvider(t *testing.T) {
|
||||
ZoneId: fZoneId,
|
||||
CertificateId: fCertificateId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cmcccloudcdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/cmcccloud-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CMCCCLOUDCDN_")
|
||||
fp = it.Args("CMCCCLOUDCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cmcccloudvlb_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/cmcccloud-vlb"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CMCCCLOUDVLB_")
|
||||
fp = it.Args("CMCCCLOUDVLB_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -51,12 +53,9 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_LOADBALANCER,
|
||||
LoadbalancerId: fLoadbalancerId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
|
||||
t.Run("Deploy_ToListener", func(t *testing.T) {
|
||||
@@ -67,11 +66,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_LISTENER,
|
||||
ListenerId: fListenerId,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package cpanel_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/cpanel"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CPANEL_")
|
||||
fp = it.Args("CPANEL_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fServerUrl string
|
||||
@@ -49,11 +51,8 @@ func TestProvider(t *testing.T) {
|
||||
DeployTarget: impl.DEPLOY_TARGET_WEBSITE,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudao_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/ctcccloud-ao"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDAO_")
|
||||
fp = it.Args("CTCCCLOUDAO_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -3,12 +3,14 @@ package ctcccloudcdn_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
impl "github.com/certimate-go/certimate/pkg/core/deployer/providers/ctcccloud-cdn"
|
||||
tester "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
it "github.com/certimate-go/certimate/pkg/core/deployer/testing"
|
||||
)
|
||||
|
||||
var (
|
||||
fp = tester.Args("CTCCCLOUDCDN_")
|
||||
fp = it.Args("CTCCCLOUDCDN_")
|
||||
fTestCertPath string
|
||||
fTestKeyPath string
|
||||
fAccessKeyId string
|
||||
@@ -44,11 +46,8 @@ func TestProvider(t *testing.T) {
|
||||
DomainMatchPattern: impl.DOMAIN_MATCH_PATTERN_EXACT,
|
||||
Domain: fDomain,
|
||||
})
|
||||
if err != nil {
|
||||
t.Errorf("err: %+v", err)
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
|
||||
tester.TestDeploy(t, provider, tester.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
it.TestDeploy(t, provider, it.TestDeployArgs{CertPath: fTestCertPath, KeyPath: fTestKeyPath})
|
||||
})
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user