Skip to content

Commit

Permalink
test(provider/app_installation_resource): test importing nonexistent …
Browse files Browse the repository at this point in the history
…app installation
  • Loading branch information
cysp committed Jul 15, 2024
1 parent 373436d commit 1fc9431
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions internal/provider/app_installation_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,32 @@ func TestAccAppInstallationResourceImport(t *testing.T) {
})
}

//nolint:paralleltest
func TestAccAppInstallationResourceImportNotFound(t *testing.T) {
resource.Test(t, resource.TestCase{
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: `
resource "contentful_app_installation" "test" {
space_id = "0p38pssr0fi3"
environment_id = "test"
app_definition_id = "nonexistent"
}
`,
PlanOnly: true,
ExpectNonEmptyPlan: true,
},
{
ResourceName: "contentful_app_installation.test",
ImportState: true,
ImportStateId: "0p38pssr0fi3/test/nonexistent",
ExpectError: regexp.MustCompile(`Cannot import non-existent remote object`),
},
},
})
}

//nolint:paralleltest
func TestAccAppInstallationResourceCreateNotFound(t *testing.T) {
resource.Test(t, resource.TestCase{
Expand Down

0 comments on commit 1fc9431

Please sign in to comment.