From cd12f4108bd1807efc53447035a33d903a804223 Mon Sep 17 00:00:00 2001 From: Dharsan Date: Thu, 11 Apr 2024 18:07:41 +0530 Subject: [PATCH] test(env-type): added test for update env-type description --- internal/provider/resource_environment_type_test.go | 8 ++++++++ internal/provider/resource_environment_type_user_test.go | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/internal/provider/resource_environment_type_test.go b/internal/provider/resource_environment_type_test.go index 3f82b44..09334ea 100644 --- a/internal/provider/resource_environment_type_test.go +++ b/internal/provider/resource_environment_type_test.go @@ -30,6 +30,14 @@ func TestAccResourceEnvironmentType(t *testing.T) { ImportStateVerify: true, ImportStateVerifyIgnore: []string{"credentials"}, }, + // Update testing + { + Config: testAccResourceEnvironmentType(id, "Custom QA env"), + Check: resource.ComposeAggregateTestCheckFunc( + resource.TestCheckResourceAttr("humanitec_environment_type.qa", "id", id), + resource.TestCheckResourceAttr("humanitec_environment_type.qa", "description", "Custom QA env"), + ), + }, // Delete testing automatically occurs in TestCase }, }) diff --git a/internal/provider/resource_environment_type_user_test.go b/internal/provider/resource_environment_type_user_test.go index c8e2fa3..1496e27 100644 --- a/internal/provider/resource_environment_type_user_test.go +++ b/internal/provider/resource_environment_type_user_test.go @@ -36,7 +36,7 @@ func TestAccResourceEnvironmentTypeUser(t *testing.T) { }, // Update and Read testing { - // At the moment there is nothing we can update :-/ + // At the moment, there is nothing we can update :-/ Config: testAccResourceEnvironmentTypeUser(id, testUserID, "deployer"), Check: resource.ComposeAggregateTestCheckFunc( resource.TestCheckResourceAttr("humanitec_environment_type_user.another_user", "role", "deployer"),