From 444f2985dd46fa26f952be78f12327bffbd5aa6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A1bio=20Matavelli?= Date: Thu, 12 Sep 2024 14:53:45 +0100 Subject: [PATCH] chore: add more information to error --- drpv4/resource_drp_subnet_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drpv4/resource_drp_subnet_test.go b/drpv4/resource_drp_subnet_test.go index 3e9dbbe..febb03c 100644 --- a/drpv4/resource_drp_subnet_test.go +++ b/drpv4/resource_drp_subnet_test.go @@ -107,8 +107,13 @@ func TestAccResourceSubnet(t *testing.T) { ExpectNonEmptyPlan: true, ExpectError: regexp.MustCompile("Not Found"), PreConfig: func() { + t.Log("Removing subnet using DRP API to test terraform error handling") client := testAccProvider.Meta().(*Config) - client.session.DeleteModel("subnets", "test1") + r, err := client.session.DeleteModel("subnets", "test1") + if err != nil { + t.Errorf("failed to remove subnet using DRP API: %v", err) + } + t.Logf("got response: %v", r) }, }, },