@@ -22,7 +22,7 @@ func TestAccPlaylist_basic(t *testing.T) {
2222 CheckDestroy : testAccPlaylistDestroy ,
2323 Steps : []resource.TestStep {
2424 {
25- Config : testAccPlaylistConfigBasic (rName ),
25+ Config : testAccPlaylistConfigBasic (rName , "5m" ),
2626 Check : resource .ComposeTestCheckFunc (
2727 testAccPlaylistCheckExists (),
2828 resource .TestMatchResourceAttr (paylistResource , "id" , uidRegexp ),
@@ -58,9 +58,17 @@ func TestAccPlaylist_update(t *testing.T) {
5858 CheckDestroy : testAccPlaylistDestroy ,
5959 Steps : []resource.TestStep {
6060 {
61- Config : testAccPlaylistConfigBasic (rName ),
61+ Config : testAccPlaylistConfigBasic (rName , "5m" ),
6262 Check : resource .ComposeTestCheckFunc (
6363 testAccPlaylistCheckExists (),
64+ resource .TestCheckResourceAttr (paylistResource , "interval" , "5m" ),
65+ ),
66+ },
67+ {
68+ Config : testAccPlaylistConfigBasic (rName , "10m" ),
69+ Check : resource .ComposeTestCheckFunc (
70+ testAccPlaylistCheckExists (),
71+ resource .TestCheckResourceAttr (paylistResource , "interval" , "10m" ),
6472 ),
6573 },
6674 {
@@ -97,7 +105,7 @@ func TestAccPlaylist_disappears(t *testing.T) {
97105 CheckDestroy : testAccPlaylistDestroy ,
98106 Steps : []resource.TestStep {
99107 {
100- Config : testAccPlaylistConfigBasic (rName ),
108+ Config : testAccPlaylistConfigBasic (rName , "5m" ),
101109 Check : resource .ComposeTestCheckFunc (
102110 testAccPlaylistCheckExists (),
103111 testAccPlaylistDisappears (),
@@ -172,11 +180,11 @@ func testAccPlaylistDestroy(s *terraform.State) error {
172180 return nil
173181}
174182
175- func testAccPlaylistConfigBasic (name string ) string {
183+ func testAccPlaylistConfigBasic (name , interval string ) string {
176184 return fmt .Sprintf (`
177185resource "grafana_playlist" "test" {
178186 name = %[1]q
179- interval = "5m"
187+ interval = %[2]q
180188
181189 item {
182190 order = 1
@@ -188,7 +196,7 @@ resource "grafana_playlist" "test" {
188196 title = "Terraform Dashboard By ID"
189197 }
190198}
191- ` , name )
199+ ` , name , interval )
192200}
193201
194202func testAccPlaylistConfigUpdate (name string ) string {
0 commit comments