-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tse): [115706940]support strategy #2526
Conversation
5e3e6a5
to
0fb6a7a
Compare
b15462e
to
391e7f0
Compare
@@ -126,6 +126,12 @@ func ResourceTencentCloudTseCngwGroup() *schema.Resource { | |||
}, | |||
}, | |||
}, | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个变更貌似 changelog 中没有体现
const testAccTseCngwNetwork = ` | ||
|
||
resource "tencentcloud_tse_cngw_network" "cngw_network" { | ||
gateway_id = "gateway-cf8c99c3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些都是预置的资源吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是开启外网资源,我使用个人账号测试通过,这个只是写了个例子
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccTseCngwNetwork, | ||
Check: resource.ComposeTestCheckFunc(resource.TestCheckResourceAttrSet("tencentcloud_tse_cngw_network.cngw_network", "id")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
补充修改和删除的测试用例
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是开启外网资源,我使用个人账号测试通过
Delete: resourceTencentCloudTseCngwStrategyBindGroupDelete, | ||
Importer: &schema.ResourceImporter{ | ||
State: func(d *schema.ResourceData, m interface{}) ([]*schema.ResourceData, error) { | ||
defaultValues := map[string]interface{}{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这段是什么意思呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import时默认bind,这个是绑定操作,如果可以import,那么就是存在棒定关系的,操作就是bind操作
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import给一个默认值
{ | ||
Config: testAccTseCngwStrategyBindGroup, | ||
Check: resource.ComposeTestCheckFunc( | ||
resource.TestCheckResourceAttrSet("tencentcloud_tse_cngw_strategy_bind_group.cngw_strategy_bind_group", "id"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里测试用例每个字段都验证下呢
@@ -1200,6 +1201,7 @@ func (me *TseService) DescribeTseGroupsByFilter(ctx context.Context, param map[s | |||
func (me *TseService) CheckTseNativeAPIGatewayGroupStatusById(ctx context.Context, gatewayId, groupId, operate string) (errRet error) { | |||
logId := tccommon.GetLogId(ctx) | |||
|
|||
time.Sleep(5 * time.Second) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里为什么要 sleep 呢
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
创建修改后立即查询无法查询到正确的状态,需要等待一下
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.