@@ -63,7 +63,8 @@ func init() {
6363 })
6464}
6565
66- func TestAccTencentCloudCfsAccessGroup (t * testing.T ) {
66+ // go test -i; go test -test.run TestAccTencentCloudCfsAccessGroup_basic -v
67+ func TestAccTencentCloudCfsAccessGroup_basic (t * testing.T ) {
6768 t .Parallel ()
6869 resource .Test (t , resource.TestCase {
6970 PreCheck : func () { testAccPreCheck (t ) },
@@ -73,9 +74,22 @@ func TestAccTencentCloudCfsAccessGroup(t *testing.T) {
7374 {
7475 Config : testAccCfsAccessGroup ,
7576 Check : resource .ComposeTestCheckFunc (
76- testAccCheckCfsAccessGroupExists ("tencentcloud_cfs_access_group.foo" ),
77- resource .TestCheckResourceAttr ("tencentcloud_cfs_access_group.foo" , "name" , "test_cfs_access_group" ),
78- resource .TestCheckResourceAttr ("tencentcloud_cfs_access_group.foo" , "description" , "test" ),
77+ testAccCheckCfsAccessGroupExists ("tencentcloud_cfs_access_group.example" ),
78+ resource .TestCheckResourceAttr ("tencentcloud_cfs_access_group.example" , "name" , "tx_example" ),
79+ resource .TestCheckResourceAttr ("tencentcloud_cfs_access_group.example" , "description" , "desc." ),
80+ ),
81+ },
82+ {
83+ ResourceName : "tencentcloud_cfs_access_group.example" ,
84+ ImportState : true ,
85+ ImportStateVerify : true ,
86+ },
87+ {
88+ Config : testAccCfsAccessGroupUpdate ,
89+ Check : resource .ComposeTestCheckFunc (
90+ testAccCheckCfsAccessGroupExists ("tencentcloud_cfs_access_group.example" ),
91+ resource .TestCheckResourceAttr ("tencentcloud_cfs_access_group.example" , "name" , "tx_example_update" ),
92+ resource .TestCheckResourceAttr ("tencentcloud_cfs_access_group.example" , "description" , "desc update." ),
7993 ),
8094 },
8195 },
@@ -149,8 +163,15 @@ func testAccCheckCfsAccessGroupExists(n string) resource.TestCheckFunc {
149163}
150164
151165const testAccCfsAccessGroup = `
152- resource "tencentcloud_cfs_access_group" "foo" {
153- name = "test_cfs_access_group"
154- description = "test"
166+ resource "tencentcloud_cfs_access_group" "example" {
167+ name = "tx_example"
168+ description = "desc."
169+ }
170+ `
171+
172+ const testAccCfsAccessGroupUpdate = `
173+ resource "tencentcloud_cfs_access_group" "example" {
174+ name = "tx_example_update"
175+ description = "desc update."
155176}
156177`
0 commit comments