From 5aa992539e50c8fcefc7fecf7abf5a9f72f418b9 Mon Sep 17 00:00:00 2001 From: 1riatsila1 Date: Fri, 8 Nov 2024 14:04:38 +0400 Subject: [PATCH] smol fixes --- .../service_test_group_assignment_test.go | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/test/live/resources/service_test_group_assignment_test.go b/test/live/resources/service_test_group_assignment_test.go index bcb146d6..ba230885 100644 --- a/test/live/resources/service_test_group_assignment_test.go +++ b/test/live/resources/service_test_group_assignment_test.go @@ -4,9 +4,10 @@ import ( "testing" "github.com/aruba-uxi/terraform-provider-configuration/test/live/config" + "github.com/aruba-uxi/terraform-provider-configuration/test/live/provider" "github.com/aruba-uxi/terraform-provider-configuration/test/live/util" - "github.com/aruba-uxi/terraform-provider-configuration/test/mocked/provider" "github.com/hashicorp/terraform-plugin-testing/helper/resource" + "github.com/nbio/st" ) func TestServiceTestGroupAssignmentResource(t *testing.T) { @@ -42,15 +43,13 @@ func TestServiceTestGroupAssignmentResource(t *testing.T) { "service_test_id", config.ServiceTestUid, ), - resource.TestCheckResourceAttr( + resource.TestCheckResourceAttrWith( "uxi_service_test_group_assignment.my_service_test_group_assignment", "group_id", - util.GetGroupByName(groupName).Id, - ), - resource.TestCheckResourceAttr( - "uxi_service_test_group_assignment.my_service_test_group_assignment", - "id", - config.ServiceTestUid, + func(value string) error { + st.Assert(t, value, util.GetGroupByName(groupName).Id) + return nil + }, ), ), }, @@ -88,10 +87,13 @@ func TestServiceTestGroupAssignmentResource(t *testing.T) { "service_test_id", config.ServiceTestUid, ), - resource.TestCheckResourceAttr( + resource.TestCheckResourceAttrWith( "uxi_service_test_group_assignment.my_service_test_group_assignment", "group_id", - util.GetGroupByName(group2Name).Id, + func(value string) error { + st.Assert(t, value, util.GetGroupByName(group2Name).Id) + return nil + }, ), ), },