Skip to content

Commit

Permalink
remove update test for resource cannot be updated
Browse files Browse the repository at this point in the history
  • Loading branch information
teowa committed Sep 26, 2024
1 parent c548899 commit 6f03cb2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,6 @@ func TestAccDataProtectionBackupPolicyDisk_complete(t *testing.T) {
})
}

func TestAccDataProtectionBackupPolicyDisk_update(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_policy_disk", "test")
r := DataProtectionBackupPolicyDiskResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep(),
{
Config: r.complete(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep(),
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep(),
})
}

func (r DataProtectionBackupPolicyDiskResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) {
id, err := backuppolicies.ParseBackupPolicyID(state.ID)
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,34 +61,6 @@ func TestAccDataProtectionBackupPolicyPostgreSQL_complete(t *testing.T) {
})
}

func TestAccDataProtectionBackupPolicyPostgreSQL_update(t *testing.T) {
data := acceptance.BuildTestData(t, "azurerm_data_protection_backup_policy_postgresql", "test")
r := DataProtectionBackupPolicyPostgreSQLResource{}
data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep(),
{
Config: r.complete(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep(),
{
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
),
},
data.ImportStep(),
})
}

func (r DataProtectionBackupPolicyPostgreSQLResource) Exists(ctx context.Context, client *clients.Client, state *pluginsdk.InstanceState) (*bool, error) {
id, err := backuppolicies.ParseBackupPolicyID(state.ID)
if err != nil {
Expand Down

0 comments on commit 6f03cb2

Please sign in to comment.