@@ -16,12 +16,18 @@ func TestAccTencentCloudCamMfaFlagResource_basic(t *testing.T) {
1616 Steps : []resource.TestStep {
1717 {
1818 Config : testAccCamMfaFlag ,
19- Check : resource .ComposeTestCheckFunc (resource .TestCheckResourceAttrSet ("tencentcloud_cam_mfa_flag.mfa_flag" , "id" )),
20- },
21- {
22- ResourceName : "tencentcloud_cam_mfa_flag.mfa_flag" ,
23- ImportState : true ,
24- ImportStateVerify : true ,
19+ Check : resource .ComposeTestCheckFunc (
20+ resource .TestCheckResourceAttrSet ("tencentcloud_cam_mfa_flag.mfa_flag" , "id" ),
21+ resource .TestCheckResourceAttrSet ("tencentcloud_cam_mfa_flag.mfa_flag" , "login_flag.#" ),
22+ resource .TestCheckResourceAttr ("tencentcloud_cam_mfa_flag.mfa_flag" , "login_flag.0.phone" , "0" ),
23+ resource .TestCheckResourceAttr ("tencentcloud_cam_mfa_flag.mfa_flag" , "login_flag.0.stoken" , "1" ),
24+ resource .TestCheckResourceAttr ("tencentcloud_cam_mfa_flag.mfa_flag" , "login_flag.0.wechat" , "0" ),
25+
26+ resource .TestCheckResourceAttrSet ("tencentcloud_cam_mfa_flag.mfa_flag" , "action_flag.#" ),
27+ resource .TestCheckResourceAttr ("tencentcloud_cam_mfa_flag.mfa_flag" , "action_flag.0.phone" , "0" ),
28+ resource .TestCheckResourceAttr ("tencentcloud_cam_mfa_flag.mfa_flag" , "action_flag.0.stoken" , "1" ),
29+ resource .TestCheckResourceAttr ("tencentcloud_cam_mfa_flag.mfa_flag" , "action_flag.0.wechat" , "0" ),
30+ ),
2531 },
2632 },
2733 })
@@ -36,7 +42,6 @@ resource "tencentcloud_cam_mfa_flag" "mfa_flag" {
3642 phone = 0
3743 stoken = 1
3844 wechat = 0
39-
4045 }
4146 action_flag {
4247 phone = 0
0 commit comments