Skip to content

Commit

Permalink
feat: e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiMengXS committed Oct 8, 2023
1 parent 6bdea79 commit 5fc55a9
Show file tree
Hide file tree
Showing 19 changed files with 70 additions and 70 deletions.
12 changes: 6 additions & 6 deletions .changelog/2174.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
```release-note:new-resource
tencentcloud_ssl_check_certificate_chain
tencentcloud_ssl_check_certificate_chain_operation
```

```release-note:new-resource
tencentcloud_ssl_complete_certificate
tencentcloud_ssl_complete_certificate_operation
```

```release-note:new-resource
tencentcloud_ssl_deploy_certificate_instance
tencentcloud_ssl_deploy_certificate_instance_operation
```

```release-note:new-resource
tencentcloud_ssl_deploy_certificate_record_retry
tencentcloud_ssl_deploy_certificate_record_retry_operation
```

```release-note:new-resource
tencentcloud_ssl_deploy_certificate_record_rollback
tencentcloud_ssl_deploy_certificate_record_rollback_operation
```

```release-note:new-resource
tencentcloud_ssl_download_certificate
tencentcloud_ssl_download_certificate_operation
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Provides a resource to create a ssl check_certificate_chain
Example Usage
```hcl
resource "tencentcloud_ssl_check_certificate_chain" "check_certificate_chain" {
resource "tencentcloud_ssl_check_certificate_chain_operation" "check_certificate_chain" {
certificate_chain = "-----BEGIN CERTIFICATE--·····---END CERTIFICATE-----"
}
```
Expand All @@ -14,7 +14,7 @@ Import
ssl check_certificate_chain can be imported using the id, e.g.
```
terraform import tencentcloud_ssl_check_certificate_chain.check_certificate_chain check_certificate_chain_id
terraform import tencentcloud_ssl_check_certificate_chain_operation.check_certificate_chain check_certificate_chain_id
```
*/
package tencentcloud
Expand Down Expand Up @@ -50,7 +50,7 @@ func resourceTencentCloudSslCheckCertificateChainOperation() *schema.Resource {
}

func resourceTencentCloudSslCheckCertificateChainCreate(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_check_certificate_chain.create")()
defer logElapsed("resource.tencentcloud_ssl_check_certificate_chain_operation.create")()
defer inconsistentCheck(d, meta)()

logId := getLogId(contextNil)
Expand Down Expand Up @@ -87,14 +87,14 @@ func resourceTencentCloudSslCheckCertificateChainCreate(d *schema.ResourceData,
}

func resourceTencentCloudSslCheckCertificateChainRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_check_certificate_chain.read")()
defer logElapsed("resource.tencentcloud_ssl_check_certificate_chain_operation.read")()
defer inconsistentCheck(d, meta)()

return nil
}

func resourceTencentCloudSslCheckCertificateChainDelete(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_check_certificate_chain.delete")()
defer logElapsed("resource.tencentcloud_ssl_check_certificate_chain_operation.delete")()
defer inconsistentCheck(d, meta)()

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func TestAccTencentCloudSslCheckCertificateChainResource_basic(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccSslCheckCertificateChain,
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_check_certificate_chain.check_certificate_chain", "id"),
resource.TestCheckResourceAttrSet("tencentcloud_ssl_check_certificate_chain.check_certificate_chain", "certificate_chain"),
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_check_certificate_chain_operation.check_certificate_chain", "id"),
resource.TestCheckResourceAttrSet("tencentcloud_ssl_check_certificate_chain_operation.check_certificate_chain", "certificate_chain"),
),
},
},
Expand All @@ -26,7 +26,7 @@ func TestAccTencentCloudSslCheckCertificateChainResource_basic(t *testing.T) {

const testAccSslCheckCertificateChain = `
resource "tencentcloud_ssl_check_certificate_chain" "check_certificate_chain" {
resource "tencentcloud_ssl_check_certificate_chain_operation" "check_certificate_chain" {
certificate_chain = <<EOT
-----BEGIN CERTIFICATE-----
MIIGgjCCBOqgAwIBAgIQD2LBHbHYKhfZEhJYSdrsXTANBgkqhkiG9w0BAQwFADBZ
Expand Down
10 changes: 5 additions & 5 deletions tencentcloud/resource_tc_ssl_complete_certificate_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Provides a resource to create a ssl complete_certificate
Example Usage
```hcl
resource "tencentcloud_ssl_complete_certificate" "complete_certificate" {
resource "tencentcloud_ssl_complete_certificate_operation" "complete_certificate" {
certificate_id = "9Bfe1IBR"
}
```
Expand All @@ -14,7 +14,7 @@ Import
ssl complete_certificate can be imported using the id, e.g.
```
terraform import tencentcloud_ssl_complete_certificate.complete_certificate complete_certificate_id
terraform import tencentcloud_ssl_complete_certificate_operation.complete_certificate complete_certificate_id
```
*/
package tencentcloud
Expand Down Expand Up @@ -48,7 +48,7 @@ func resourceTencentCloudSslCompleteCertificateOperation() *schema.Resource {
}

func resourceTencentCloudSslCompleteCertificateCreate(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_complete_certificate.create")()
defer logElapsed("resource.tencentcloud_ssl_complete_certificate_operation.create")()
defer inconsistentCheck(d, meta)()

logId := getLogId(contextNil)
Expand Down Expand Up @@ -85,14 +85,14 @@ func resourceTencentCloudSslCompleteCertificateCreate(d *schema.ResourceData, me
}

func resourceTencentCloudSslCompleteCertificateRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_complete_certificate.read")()
defer logElapsed("resource.tencentcloud_ssl_complete_certificate_operation.read")()
defer inconsistentCheck(d, meta)()

return nil
}

func resourceTencentCloudSslCompleteCertificateDelete(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_complete_certificate.delete")()
defer logElapsed("resource.tencentcloud_ssl_complete_certificate_operation.delete")()
defer inconsistentCheck(d, meta)()

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func TestAccTencentCloudSslCompleteCertificateResource_basic(t *testing.T) {
Steps: []resource.TestStep{
{
Config: testAccSslCompleteCertificate,
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_complete_certificate.complete_certificate", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_complete_certificate.complete_certificate", "certificate_id", "709ahm2q"),
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_complete_certificate_operation.complete_certificate", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_complete_certificate_operation.complete_certificate", "certificate_id", "709ahm2q"),
),
},
},
Expand All @@ -26,7 +26,7 @@ func TestAccTencentCloudSslCompleteCertificateResource_basic(t *testing.T) {

const testAccSslCompleteCertificate = `
resource "tencentcloud_ssl_complete_certificate" "complete_certificate" {
resource "tencentcloud_ssl_complete_certificate_operation" "complete_certificate" {
certificate_id = "709ahm2q"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Provides a resource to create a ssl deploy_certificate_instance
Example Usage
```hcl
resource "tencentcloud_ssl_deploy_certificate_instance" "deploy_certificate_instance" {
resource "tencentcloud_ssl_deploy_certificate_instance_operation" "deploy_certificate_instance" {
certificate_id = "8x1eUSSl"
instance_id_list =[api1.ninghhuang.online|off]
}
Expand All @@ -15,7 +15,7 @@ Import
ssl deploy_certificate_instance can be imported using the id, e.g.
```
terraform import tencentcloud_ssl_deploy_certificate_instance.deploy_certificate_instance deploy_certificate_instance_id
terraform import tencentcloud_ssl_deploy_certificate_instance_operation.deploy_certificate_instance deploy_certificate_instance_id
```
*/
package tencentcloud
Expand Down Expand Up @@ -73,7 +73,7 @@ func resourceTencentCloudSslDeployCertificateInstanceOperation() *schema.Resourc
}

func resourceTencentCloudSslDeployCertificateInstanceCreate(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_instance.create")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_instance_operation.create")()
defer inconsistentCheck(d, meta)()

logId := getLogId(contextNil)
Expand Down Expand Up @@ -125,14 +125,14 @@ func resourceTencentCloudSslDeployCertificateInstanceCreate(d *schema.ResourceDa
}

func resourceTencentCloudSslDeployCertificateInstanceRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_instance.read")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_instance_operation.read")()
defer inconsistentCheck(d, meta)()

return nil
}

func resourceTencentCloudSslDeployCertificateInstanceDelete(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_instance.delete")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_instance_operation.delete")()
defer inconsistentCheck(d, meta)()

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ func TestAccTencentCloudSslDeployCertificateInstanceResource_basic(t *testing.T)
Steps: []resource.TestStep{
{
Config: testAccSslDeployCertificateInstance,
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_deploy_certificate_instance.deploy_certificate_instance", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_instance.deploy_certificate_instance", "certificate_id", "9Bpk7XOu"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_instance.deploy_certificate_instance", "resource_type", "cdn"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_instance.deploy_certificate_instance", "instance_id_list.0", "api1.ninghhuang.online|off"),
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_deploy_certificate_instance_operation.deploy_certificate_instance", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_instance_operation.deploy_certificate_instance", "certificate_id", "9Bpk7XOu"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_instance_operation.deploy_certificate_instance", "resource_type", "cdn"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_instance_operation.deploy_certificate_instance", "instance_id_list.0", "api1.ninghhuang.online|off"),
),
},
},
Expand All @@ -28,7 +28,7 @@ func TestAccTencentCloudSslDeployCertificateInstanceResource_basic(t *testing.T)

const testAccSslDeployCertificateInstance = `
resource "tencentcloud_ssl_deploy_certificate_instance" "deploy_certificate_instance" {
resource "tencentcloud_ssl_deploy_certificate_instance_operation" "deploy_certificate_instance" {
certificate_id = "9Bpk7XOu"
resource_type = "cdn"
instance_id_list =["api1.ninghhuang.online|off"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Provides a resource to create a ssl deploy_certificate_record_retry
Example Usage
```hcl
resource "tencentcloud_ssl_deploy_certificate_record_retry" "deploy_certificate_record_retry" {
resource "tencentcloud_ssl_deploy_certificate_record_retry_operation" "deploy_certificate_record_retry" {
deploy_record_id = 35474
}
```
Expand All @@ -14,7 +14,7 @@ Import
ssl deploy_certificate_record_retry can be imported using the id, e.g.
```
terraform import tencentcloud_ssl_deploy_certificate_record_retry.deploy_certificate_record_retry deploy_certificate_record_retry_id
terraform import tencentcloud_ssl_deploy_certificate_record_retry_operation.deploy_certificate_record_retry deploy_certificate_record_retry_id
```
*/
package tencentcloud
Expand Down Expand Up @@ -55,7 +55,7 @@ func resourceTencentCloudSslDeployCertificateRecordRetryOperation() *schema.Reso
}

func resourceTencentCloudSslDeployCertificateRecordRetryCreate(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_retry.create")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_retry_operation.create")()
defer inconsistentCheck(d, meta)()

logId := getLogId(contextNil)
Expand Down Expand Up @@ -93,14 +93,14 @@ func resourceTencentCloudSslDeployCertificateRecordRetryCreate(d *schema.Resourc
}

func resourceTencentCloudSslDeployCertificateRecordRetryRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_retry.read")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_retry_operation.read")()
defer inconsistentCheck(d, meta)()

return nil
}

func resourceTencentCloudSslDeployCertificateRecordRetryDelete(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_retry.delete")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_retry_operation.delete")()
defer inconsistentCheck(d, meta)()

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func TestAccTencentCloudSslDeployCertificateRecordRetryResource_basic(t *testing
Steps: []resource.TestStep{
{
Config: testAccSslDeployCertificateRecordRetry,
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_deploy_certificate_record_retry.deploy_certificate_record_retry", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_record_retry.deploy_certificate_record_retry", "deploy_record_id", "35521"),
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_deploy_certificate_record_retry_operation.deploy_certificate_record_retry", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_record_retry_operation.deploy_certificate_record_retry", "deploy_record_id", "36062"),
),
},
},
Expand All @@ -26,8 +26,8 @@ func TestAccTencentCloudSslDeployCertificateRecordRetryResource_basic(t *testing

const testAccSslDeployCertificateRecordRetry = `
resource "tencentcloud_ssl_deploy_certificate_record_retry" "deploy_certificate_record_retry" {
deploy_record_id = 35521
resource "tencentcloud_ssl_deploy_certificate_record_retry_operation" "deploy_certificate_record_retry" {
deploy_record_id = 36062
}
`
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Provides a resource to create a ssl deploy_certificate_record_rollback
Example Usage
```hcl
resource "tencentcloud_ssl_deploy_certificate_record_rollback" "deploy_certificate_record_rollback" {
resource "tencentcloud_ssl_deploy_certificate_record_rollback_operation" "deploy_certificate_record_rollback" {
deploy_record_id = 35471
}
```
Expand All @@ -14,7 +14,7 @@ Import
ssl deploy_certificate_record_rollback can be imported using the id, e.g.
```
terraform import tencentcloud_ssl_deploy_certificate_record_rollback.deploy_certificate_record_rollback deploy_certificate_record_rollback_id
terraform import tencentcloud_ssl_deploy_certificate_record_rollback_operation.deploy_certificate_record_rollback deploy_certificate_record_rollback_id
```
*/
package tencentcloud
Expand Down Expand Up @@ -48,7 +48,7 @@ func resourceTencentCloudSslDeployCertificateRecordRollbackOperation() *schema.R
}

func resourceTencentCloudSslDeployCertificateRecordRollbackCreate(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_rollback.create")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_rollback_operation.create")()
defer inconsistentCheck(d, meta)()

logId := getLogId(contextNil)
Expand Down Expand Up @@ -85,14 +85,14 @@ func resourceTencentCloudSslDeployCertificateRecordRollbackCreate(d *schema.Reso
}

func resourceTencentCloudSslDeployCertificateRecordRollbackRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_rollback.read")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_rollback_operation.read")()
defer inconsistentCheck(d, meta)()

return nil
}

func resourceTencentCloudSslDeployCertificateRecordRollbackDelete(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_rollback.delete")()
defer logElapsed("resource.tencentcloud_ssl_deploy_certificate_record_rollback_operation.delete")()
defer inconsistentCheck(d, meta)()

return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ func TestAccTencentCloudSslDeployCertificateRecordRollbackResource_basic(t *test
Steps: []resource.TestStep{
{
Config: testAccSslDeployCertificateRecordRollback,
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_deploy_certificate_record_rollback.deploy_certificate_record_rollback", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_record_rollback.deploy_certificate_record_rollback", "deploy_record_id", "36058"),
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_ssl_deploy_certificate_record_rollback_operation.deploy_certificate_record_rollback", "id"),
resource.TestCheckResourceAttr("tencentcloud_ssl_deploy_certificate_record_rollback_operation.deploy_certificate_record_rollback", "deploy_record_id", "36058"),
),
},
},
Expand All @@ -26,7 +26,7 @@ func TestAccTencentCloudSslDeployCertificateRecordRollbackResource_basic(t *test

const testAccSslDeployCertificateRecordRollback = `
resource "tencentcloud_ssl_deploy_certificate_record_rollback" "deploy_certificate_record_rollback" {
resource "tencentcloud_ssl_deploy_certificate_record_rollback_operation" "deploy_certificate_record_rollback" {
deploy_record_id = 36058
}
Expand Down
Loading

0 comments on commit 5fc55a9

Please sign in to comment.