Skip to content

Conversation

@gailwang
Copy link
Contributor

@gailwang gailwang commented Oct 9, 2020

make testacc TESTARGS=" -run=TestAccTencentCloudInstanceWithImageLogin"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./... -v -run=TestAccTencentCloudInstanceWithImageLogin -timeout 120m
?       github.com/tencentcloudstack/terraform-provider-tencentcloud    [no test files]
testing: warning: no tests to run
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/gendoc    (cached) [no tests to run]
=== RUN   TestAccTencentCloudInstanceWithImageLogin
=== PAUSE TestAccTencentCloudInstanceWithImageLogin
=== CONT  TestAccTencentCloudInstanceWithImageLogin
--- PASS: TestAccTencentCloudInstanceWithImageLogin (66.27s)
PASS
ok      github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud       67.669s
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/connectivity  [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper       [no test files]
?       github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/ratelimit     [no test files]

if v, ok := d.GetOk("password"); ok {
request.LoginSettings.Password = helper.String(v.(string))
}
if v, ok := d.GetOkExists("keep_image_login"); ok {
Copy link
Contributor

Choose a reason for hiding this comment

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

default字段,直接get哇

Copy link
Contributor Author

Choose a reason for hiding this comment

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

有道理

)
}

func testAccTencentCloudInstanceWithImageLogin() string {
Copy link
Contributor

Choose a reason for hiding this comment

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

可以直接写个const string,没必要写函数

@oliverpei oliverpei merged commit d6b21d5 into tencentcloudstack:master Oct 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants