From 7b870d03a430d7d6f47ed402f8301c7f0bfb2ef8 Mon Sep 17 00:00:00 2001 From: Norbert Dopjera Date: Sun, 30 Jun 2024 00:58:41 +0200 Subject: [PATCH] fix(domain|test): update - at least one 'assignment' or 'tag' must be always set (#104) * fix(domain|test): update - at least one 'assignment' or 'tag' must be always set * fix(domain|test): update - expected 2 assignments in final --- internal/domain_test.go | 2 +- internal/testdata/TestAccDomainResource/update_assignments.tf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/domain_test.go b/internal/domain_test.go index f9428df..4212631 100644 --- a/internal/domain_test.go +++ b/internal/domain_test.go @@ -83,7 +83,7 @@ func TestAccDomainResource(t *testing.T) { //resource.TestCheckResourceAttr("montecarlo_domain.test", "uuid", domainUuid), resource.TestCheckResourceAttr("montecarlo_domain.test", "name", "domain2"), resource.TestCheckResourceAttr("montecarlo_domain.test", "description", "Domain test description 2"), - resource.TestCheckResourceAttr("montecarlo_domain.test", "assignments.#", "0"), + resource.TestCheckResourceAttr("montecarlo_domain.test", "assignments.#", "2"), resource.TestCheckResourceAttr("montecarlo_domain.test", "tags.#", "0"), ), }, diff --git a/internal/testdata/TestAccDomainResource/update_assignments.tf b/internal/testdata/TestAccDomainResource/update_assignments.tf index f989ece..540c5d6 100644 --- a/internal/testdata/TestAccDomainResource/update_assignments.tf +++ b/internal/testdata/TestAccDomainResource/update_assignments.tf @@ -17,7 +17,7 @@ resource "montecarlo_domain" "test" { name = "domain2" description = "Domain test description 2" assignments = [ - #"MCON++a84380ed-b962-4bd3-b150-04bc38a209d5++427a1600-2653-40c5-a1e7-5ec98703ee9d++project++gcp-project1-722af1c6", - #"MCON++a84380ed-b962-4bd3-b150-04bc38a209d5++e7c59fd6-7ca8-41e7-8325-062ea38d3df5++dataset++postgre-dataset-1" + "MCON++3e9abc75-5dc1-447e-b4cb-9d5a6fc5db5c++da6c0716-2724-4bfc-b5cc-7e0364faf979++table++data-playground-8bb9fc23:terraform_provider_montecarlo.person", + "MCON++3e9abc75-5dc1-447e-b4cb-9d5a6fc5db5c++da6c0716-2724-4bfc-b5cc-7e0364faf979++table++data-playground-8bb9fc23:terraform_provider_montecarlo.device" ] }