Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharth-kulshrestha authored and siddharth-nutanix committed Feb 28, 2022
1 parent bd18e63 commit a8e4628
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions nutanix/data_source_nutanix_service_groups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ func TestAccNutanixServiceGroupsDataSource_basic(t *testing.T) {
{
Config: testAccServiceGroupsDataSourceConfig(name, description),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttrSet("data.nutanix_service_groups.service_groups", "entities.0.service_group.name"),
resource.TestCheckResourceAttrSet("data.nutanix_service_groups.service_groups", "entities.0.service_group.description"),
resource.TestCheckResourceAttrSet("data.nutanix_service_groups.service_groups", "entities.0.service_group.0.name"),
resource.TestCheckResourceAttrSet("data.nutanix_service_groups.service_groups", "entities.0.service_group.0.description"),
resource.TestCheckResourceAttrSet("data.nutanix_service_groups.service_groups", "entities.0.uuid"),
),
},
Expand All @@ -30,21 +30,22 @@ func TestAccNutanixServiceGroupsDataSource_basic(t *testing.T) {
func testAccServiceGroupsDataSourceConfig(name, description string) string {
return fmt.Sprintf(`
resource "nutanix_service_group" "test" {
name = "%[1]s"
description = "%[2]s"
name = "%[1]s"
description = "%[2]s"
service_list {
protocol = "TCP"
tcp_port_range_list {
start_port = 22
end_port = 22
}
tcp_port_range_list {
start_port = 2222
end_port = 2222
}
service_list {
protocol = "TCP"
tcp_port_range_list {
start_port = 22
end_port = 22
}
tcp_port_range_list {
start_port = 2222
end_port = 2222
}
}
}
data "nutanix_service_groups" "service_groups" {}
}`, name, description)
`, name, description)
}

0 comments on commit a8e4628

Please sign in to comment.