Skip to content
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/waf #2111

Merged
merged 24 commits into from
Sep 22, 2023
Merged

feat/waf #2111

merged 24 commits into from
Sep 22, 2023

Conversation

SevenEarth
Copy link
Collaborator

feat/waf

@SevenEarth SevenEarth added the run check run check label Sep 7, 2023
@SevenEarth SevenEarth added run check run check and removed run check run check labels Sep 21, 2023
@SevenEarth SevenEarth added run check run check and removed run check run check labels Sep 22, 2023
@SevenEarth SevenEarth added run check run check and removed run check run check labels Sep 22, 2023
logId = getLogId(contextNil)
ctx = context.WithValue(context.TODO(), logIdKey, logId)
service = WafService{client: meta.(*TencentCloudClient).apiV3Conn}
tLS []*waf.TLSVersion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个变量命名有点奇怪


log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())

if response == nil || len(response.Response.Ciphers) < 1 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response.Response 可能为空吗


log.Printf("[DEBUG]%s api[%s] success, request body [%s], response body [%s]\n", logId, request.GetAction(), request.ToJsonString(), response.ToJsonString())

if len(response.Response.RuleList) < 1 {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是否有可能 response.Response 为 nil 或者空

Steps: []resource.TestStep{
{
Config: testAccWafClbDomain,
Check: resource.ComposeTestCheckFunc(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e2e测试用例最好每个字段都检查下?

},
{
Config: testAccWafClbDomainUpdate,
Check: resource.ComposeTestCheckFunc(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上,每个字段都检查下?

return err
}

ruleId := *response.Response.RuleId
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

response.Response 是否可能为空

Copy link
Collaborator

@andrew-tx andrew-tx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先合入,有几个小点,下次调整

@andrew-tx andrew-tx merged commit 4dd8bcc into master Sep 22, 2023
@andrew-tx andrew-tx deleted the feat/waf branch September 22, 2023 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run check run check
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants