-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: changed resource name for tests
Signed-off-by: Matthias Theuermann <[email protected]>
- Loading branch information
1 parent
fd81d92
commit 08eb9ea
Showing
1 changed file
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,18 +22,18 @@ func TestAccEmailIntegrationResource(t *testing.T) { | |
{"name": "Alice Doe", "email": "[email protected]", "is_default": false, "reference_url": "https://example.com"}, | ||
}), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "name", "one"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "recipients.0.name", "John Doe"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "name", "one"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "recipients.0.name", "John Doe"), | ||
), | ||
}, | ||
{ | ||
Config: testAccEmailIntegrationResourceWithSpaceInProviderConfig(accSpace.ID(), "two", true, true), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "name", "two"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "auto_create", "true"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "auto_close", "true"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "name", "two"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "auto_create", "true"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "auto_close", "true"), | ||
), | ||
}, | ||
// Update and Read testing | ||
|
@@ -43,18 +43,18 @@ func TestAccEmailIntegrationResource(t *testing.T) { | |
{"name": "Alice Doe", "email": "[email protected]", "is_default": false, "reference_url": "https://newurl.com"}, | ||
}), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "name", "three"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "recipients.0.reference_url", "https://newurl.com"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "name", "three"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "recipients.0.reference_url", "https://newurl.com"), | ||
), | ||
}, | ||
{ | ||
Config: testAccEmailIntegrationResourceWithSpaceInProviderConfig(accSpace.ID(), "four", false, false), | ||
Check: resource.ComposeAggregateTestCheckFunc( | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "name", "four"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "auto_create", "false"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.email_integration", "auto_close", "false"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "name", "four"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "space_id", accSpace.ID()), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "auto_create", "false"), | ||
resource.TestCheckResourceAttr("mondoo_integration_email.test", "auto_close", "false"), | ||
), | ||
}, | ||
// Delete testing automatically occurs in TestCase | ||
|
@@ -64,7 +64,7 @@ func TestAccEmailIntegrationResource(t *testing.T) { | |
|
||
func testAccEmailIntegrationResourceConfig(spaceID, intName string, recipients []map[string]interface{}) string { | ||
return fmt.Sprintf(` | ||
resource "mondoo_integration_email" "email_integration" { | ||
resource "mondoo_integration_email" "test" { | ||
space_id = %[1]q | ||
name = %[2]q | ||
recipients = %[3]q | ||
|