Skip to content

Commit 4435d0d

Browse files
tongyimingmikatong
andauthored
fix: cvm key pair (#1060)
Co-authored-by: mikatong <mikatong@tencent.com>
1 parent 28bdd88 commit 4435d0d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tencentcloud/resource_tc_instance_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,7 @@ func TestAccTencentCloudInstanceWithPrivateIP(t *testing.T) {
206206
})
207207
}
208208

209-
func TestAccTencentCloudNeedFixInstanceWithKeyPair(t *testing.T) {
210-
t.Parallel()
211-
209+
func TestAccTencentCloudInstanceWithKeyPair(t *testing.T) {
212210
id := "tencentcloud_instance.foo"
213211
resource.Test(t, resource.TestCase{
214212
PreCheck: func() { testAccPreCheck(t) },
@@ -227,8 +225,11 @@ func TestAccTencentCloudNeedFixInstanceWithKeyPair(t *testing.T) {
227225
),
228226
},
229227
{
230-
PreConfig: func() { testAccStepPreConfigSetTempAKSK(t, ACCOUNT_TYPE_COMMON) },
231-
Config: testAccTencentCloudInstanceWithKeyPair("key_pair_1"),
228+
PreConfig: func() {
229+
testAccStepPreConfigSetTempAKSK(t, ACCOUNT_TYPE_COMMON)
230+
time.Sleep(time.Duration(time.Second * 5))
231+
},
232+
Config: testAccTencentCloudInstanceWithKeyPair("key_pair_1"),
232233
Check: resource.ComposeTestCheckFunc(
233234
testAccCheckTencentCloudDataSourceID(id),
234235
testAccCheckTencentCloudInstanceExists(id),

0 commit comments

Comments
 (0)