Skip to content

Commit

Permalink
fix: Removes delete partition_fields statements. (#1499)
Browse files Browse the repository at this point in the history
* [bug] Removes delete partition_fields statements.

* changes test expectations.

* tries to add a 'migration' test to verify no breaking changes between versions.

* removes migration test as we should write this separately as part of our testing refactoring.
  • Loading branch information
marcosuma authored Oct 4, 2023
1 parent 726261d commit ce1ad7a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 0 additions & 1 deletion mongodbatlas/resource_mongodbatlas_online_archive.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ func fromOnlineArchiveToMap(in *matlas.OnlineArchive) map[string]interface{} {

func fromOnlineArchiveToMapInCreate(in *matlas.OnlineArchive) map[string]interface{} {
localSchema := fromOnlineArchiveToMap(in)
delete(localSchema, "partition_fields")
return localSchema
}

Expand Down
6 changes: 6 additions & 0 deletions mongodbatlas/resource_mongodbatlas_online_archive_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ func TestAccBackupRSOnlineArchive(t *testing.T) {
resource.TestCheckNoResourceAttr(onlineArchiveResourceName, "schedule.#"),
),
},
{
Config: testAccBackupRSOnlineArchiveConfigWithoutSchedule(orgID, projectName, name),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr(onlineArchiveResourceName, "partition_fields.0.field_name", "last_review"),
),
},
},
})
}
Expand Down

0 comments on commit ce1ad7a

Please sign in to comment.