Skip to content

Commit e5d7656

Browse files
tongyimingmikatong
andauthored
fix: gaap support client_ip_method (#856)
* fix: gaap support client_ip_method * fix: update gaap doc * fix: gaap unit test * fix: clientIPMethod add forcenew * fix: update unit-test gaap id Co-authored-by: mikatong <[email protected]>
1 parent fbeb497 commit e5d7656

37 files changed

+247
-170
lines changed

tencentcloud/basic_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const (
3434
defaultDayuBgpIp = "bgpip-00000294"
3535
defaultDayuNet = "net-0000007e"
3636

37-
defaultGaapProxyId = "link-5b4g19qx"
37+
defaultGaapProxyId = "link-4yb9g6tb"
3838

3939
defaultSecurityGroup = "sg-ijato2x1"
4040
defaultSecurityGroup2 = "sg-51rgzop1"

tencentcloud/data_source_tc_dayu_eip_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var testDataDayuEip = "data.tencentcloud_dayu_eip.test"
1111
func TestAccTencentCloudDataDayuEip(t *testing.T) {
1212
t.Parallel()
1313
resource.Test(t, resource.TestCase{
14-
PreCheck: func() { testAccPreCheckCommon(t, ACCTUNT_TYPE_INTERNATION) },
14+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_INTERNATION) },
1515
Providers: testAccProviders,
1616
CheckDestroy: testAccCheckDayuEipDestroy,
1717
Steps: []resource.TestStep{

tencentcloud/data_source_tc_dayu_l4_rules_v2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var testDataDayuL4RulesV2Name = "data.tencentcloud_dayu_l4_rules_v2.test"
1111
func TestAccTencentCloudDataDayuL4RulesV2(t *testing.T) {
1212
t.Parallel()
1313
resource.Test(t, resource.TestCase{
14-
PreCheck: func() { testAccPreCheckCommon(t, ACCTUNT_TYPE_INTERNATION) },
14+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_INTERNATION) },
1515
Providers: testAccProviders,
1616
CheckDestroy: testAccCheckDayuL4RuleV2Destroy,
1717
Steps: []resource.TestStep{

tencentcloud/data_source_tc_dayu_l7_rules_v2_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var testDataDayuL7RulesV2Name = "data.tencentcloud_dayu_l7_rules_v2.test"
1111
func TestAccTencentCloudDataDayuL7V2Rules(t *testing.T) {
1212
t.Parallel()
1313
resource.Test(t, resource.TestCase{
14-
PreCheck: func() { testAccPreCheckCommon(t, ACCTUNT_TYPE_INTERNATION) },
14+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_INTERNATION) },
1515
Providers: testAccProviders,
1616
CheckDestroy: testAccCheckDayuL7RuleV2Destroy,
1717
Steps: []resource.TestStep{

tencentcloud/data_source_tc_gaap_certificates_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ func TestAccDataSourceTencentCloudGaapCertificates_basic(t *testing.T) {
1212
t.Parallel()
1313

1414
resource.Test(t, resource.TestCase{
15-
PreCheck: func() { testAccPreCheck(t) },
15+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
1616
Providers: testAccProviders,
1717
Steps: []resource.TestStep{
1818
{
@@ -37,7 +37,7 @@ func TestAccDataSourceTencentCloudGaapCertificates_name(t *testing.T) {
3737
t.Parallel()
3838

3939
resource.Test(t, resource.TestCase{
40-
PreCheck: func() { testAccPreCheck(t) },
40+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
4141
Providers: testAccProviders,
4242
Steps: []resource.TestStep{
4343
{
@@ -62,7 +62,7 @@ func TestAccDataSourceTencentCloudGaapCertificates_type(t *testing.T) {
6262
t.Parallel()
6363

6464
resource.Test(t, resource.TestCase{
65-
PreCheck: func() { testAccPreCheck(t) },
65+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
6666
Providers: testAccProviders,
6767
Steps: []resource.TestStep{
6868
{

tencentcloud/data_source_tc_gaap_domain_error_pages_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestAccDataSourceTencentCloudGaapDomainErrorPages_basic(t *testing.T) {
1111
t.Parallel()
1212
resource.Test(t, resource.TestCase{
13-
PreCheck: func() { testAccPreCheck(t) },
13+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
1414
Providers: testAccProviders,
1515
Steps: []resource.TestStep{
1616
{
@@ -37,7 +37,7 @@ func TestAccDataSourceTencentCloudGaapDomainErrorPages_basic(t *testing.T) {
3737
func TestAccDataSourceTencentCloudGaapDomainErrorPages_Ids(t *testing.T) {
3838
t.Parallel()
3939
resource.Test(t, resource.TestCase{
40-
PreCheck: func() { testAccPreCheck(t) },
40+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
4141
Providers: testAccProviders,
4242
Steps: []resource.TestStep{
4343
{

tencentcloud/data_source_tc_gaap_http_domains_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
func TestAccDataSourceTencentCloudGaapHttpDomains_basic(t *testing.T) {
1212
t.Parallel()
1313
resource.Test(t, resource.TestCase{
14-
PreCheck: func() { testAccPreCheck(t) },
14+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
1515
Providers: testAccProviders,
1616
Steps: []resource.TestStep{
1717
{

tencentcloud/data_source_tc_gaap_http_rules_test.go

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
func TestAccDataSourceTencentCloudGaapHttpRules_basic(t *testing.T) {
1111
t.Parallel()
1212
resource.Test(t, resource.TestCase{
13-
PreCheck: func() { testAccPreCheck(t) },
13+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
1414
Providers: testAccProviders,
1515
Steps: []resource.TestStep{
1616
{
@@ -40,7 +40,7 @@ func TestAccDataSourceTencentCloudGaapHttpRules_basic(t *testing.T) {
4040
func TestAccDataSourceTencentCloudGaapHttpRules_path(t *testing.T) {
4141
t.Parallel()
4242
resource.Test(t, resource.TestCase{
43-
PreCheck: func() { testAccPreCheck(t) },
43+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
4444
Providers: testAccProviders,
4545
Steps: []resource.TestStep{
4646
{
@@ -70,7 +70,7 @@ func TestAccDataSourceTencentCloudGaapHttpRules_path(t *testing.T) {
7070
func TestAccDataSourceTencentCloudGaapHttpRules_forwardHost(t *testing.T) {
7171
t.Parallel()
7272
resource.Test(t, resource.TestCase{
73-
PreCheck: func() { testAccPreCheck(t) },
73+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
7474
Providers: testAccProviders,
7575
Steps: []resource.TestStep{
7676
{
@@ -110,9 +110,14 @@ resource "tencentcloud_gaap_realserver" "foo" {
110110
name = "ci-test-gaap-realserver"
111111
}
112112
113-
resource tencentcloud_gaap_http_rule "foo" {
113+
resource "tencentcloud_gaap_http_domain" "foo" {
114+
listener_id = tencentcloud_gaap_layer7_listener.foo.id
115+
domain = "www.qq.com"
116+
}
117+
118+
resource "tencentcloud_gaap_http_rule" "foo" {
114119
listener_id = tencentcloud_gaap_layer7_listener.foo.id
115-
domain = "www.qq.com"
120+
domain = tencentcloud_gaap_http_domain.foo.domain
116121
path = "/"
117122
realserver_type = "IP"
118123
health_check = true

tencentcloud/data_source_tc_gaap_layer4_listeners_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
func TestAccDataSourceTencentCloudGaapLayer4Listeners_basic(t *testing.T) {
1212
t.Parallel()
1313
resource.Test(t, resource.TestCase{
14-
PreCheck: func() { testAccPreCheck(t) },
14+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
1515
Providers: testAccProviders,
1616
Steps: []resource.TestStep{
1717
{
@@ -39,7 +39,7 @@ func TestAccDataSourceTencentCloudGaapLayer4Listeners_basic(t *testing.T) {
3939
func TestAccDataSourceTencentCloudGaapLayer4Listeners_tcp(t *testing.T) {
4040
t.Parallel()
4141
resource.Test(t, resource.TestCase{
42-
PreCheck: func() { testAccPreCheck(t) },
42+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
4343
Providers: testAccProviders,
4444
Steps: []resource.TestStep{
4545
{
@@ -81,7 +81,7 @@ func TestAccDataSourceTencentCloudGaapLayer4Listeners_tcp(t *testing.T) {
8181
func TestAccDataSourceTencentCloudGaapLayer4Listeners_UDP(t *testing.T) {
8282
t.Parallel()
8383
resource.Test(t, resource.TestCase{
84-
PreCheck: func() { testAccPreCheck(t) },
84+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
8585
Providers: testAccProviders,
8686
Steps: []resource.TestStep{
8787
{

tencentcloud/data_source_tc_gaap_layer7_listeners_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
func TestAccDataSourceTencentCloudGaapLayer7Listeners_basic(t *testing.T) {
1212
t.Parallel()
1313
resource.Test(t, resource.TestCase{
14-
PreCheck: func() { testAccPreCheck(t) },
14+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
1515
Providers: testAccProviders,
1616
Steps: []resource.TestStep{
1717
{
@@ -60,7 +60,7 @@ func TestAccDataSourceTencentCloudGaapLayer7Listeners_basic(t *testing.T) {
6060
func TestAccDataSourceTencentCloudGaapLayer7Listeners_https(t *testing.T) {
6161
t.Parallel()
6262
resource.Test(t, resource.TestCase{
63-
PreCheck: func() { testAccPreCheck(t) },
63+
PreCheck: func() { testAccPreCheckCommon(t, ACCOUNT_TYPE_PREPAY) },
6464
Providers: testAccProviders,
6565
Steps: []resource.TestStep{
6666
{

0 commit comments

Comments
 (0)