Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniehingtgen committed Nov 30, 2024
1 parent 1b73426 commit b995e0b
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions internal/resources/grafana/resource_playlist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestAccPlaylist_basic(t *testing.T) {
}),
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
"order": "2",
"title": "Terraform Dashboard By ID",
"title": "Terraform Dashboard By UID",
}),
testutils.CheckLister(paylistResource),
),
Expand Down Expand Up @@ -77,7 +77,7 @@ func TestAccPlaylist_update(t *testing.T) {
),
},
{
Config: testAccPlaylistConfigUpdate(updatedName, "cIBgcSjkk"),
Config: testAccPlaylistConfigUpdate(updatedName, "3"),
Check: resource.ComposeTestCheckFunc(
playlistCheckExists.exists(paylistResource, &playlist),
resource.TestMatchResourceAttr(paylistResource, "id", defaultOrgIDRegexp),
Expand All @@ -87,18 +87,18 @@ func TestAccPlaylist_update(t *testing.T) {
"order": "1",
"title": "Terraform Dashboard By UID",
"type": "dashboard_by_uid",
"value": "cIBgcSjkk",
"value": "3",
}),
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
"order": "2",
"title": "other",
"type": "dashboard_by_uid",
"value": "l3KqBxCMz",
"value": "uid-other",
}),
),
},
{
Config: testAccPlaylistConfigUpdate(updatedName, "H8joYFVGz"),
Config: testAccPlaylistConfigUpdate(updatedName, "4"),
Check: resource.ComposeTestCheckFunc(
playlistCheckExists.exists(paylistResource, &playlist),
resource.TestMatchResourceAttr(paylistResource, "id", defaultOrgIDRegexp),
Expand All @@ -108,13 +108,13 @@ func TestAccPlaylist_update(t *testing.T) {
"order": "1",
"title": "Terraform Dashboard By UID",
"type": "dashboard_by_uid",
"value": "H8joYFVGz",
"value": "4",
}),
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
"order": "2",
"title": "other",
"type": "dashboard_by_uid",
"value": "l3KqBxCMz",
"value": "uid-other",
}),
),
},
Expand Down Expand Up @@ -177,7 +177,7 @@ func TestAccPlaylist_inOrg(t *testing.T) {
}),
resource.TestCheckTypeSetElemNestedAttrs(paylistResource, "item.*", map[string]string{
"order": "2",
"title": "Terraform Dashboard By ID",
"title": "Terraform Dashboard By UID",
}),
),
},
Expand Down Expand Up @@ -215,7 +215,7 @@ resource "grafana_playlist" "test" {
item {
order = 2
title = "Terraform Dashboard By ID"
title = "Terraform Dashboard By UID"
}
item {
Expand All @@ -240,7 +240,7 @@ resource "grafana_playlist" "test" {
item {
order = 2
title = "Terraform Dashboard By ID"
title = "Terraform Dashboard By UID"
}
item {
Expand All @@ -262,14 +262,14 @@ resource "grafana_playlist" "test" {
order = 2
title = "other"
type = "dashboard_by_uid"
value = "l3KqBxCMz"
value = "uid-other"
}
item {
order = 1
title = "Terraform Dashboard By ID"
title = "Terraform Dashboard By UID"
type = "dashboard_by_uid"
value = "%[2]s"
value = "uid-%[2]s"
}
}
`, name, value)
Expand Down

0 comments on commit b995e0b

Please sign in to comment.