Skip to content

Commit

Permalink
INTMDB-466: Added IsExtendedStorageSizesEnabled to ProjectSettings (#457
Browse files Browse the repository at this point in the history
)
  • Loading branch information
evertsd authored Apr 17, 2023
1 parent 0fca1fa commit 728e02c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions mongodbatlas/project_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const projectSettingsBasePath = projectBasePath + "/%s/settings"
type ProjectSettings struct {
IsCollectDatabaseSpecificsStatisticsEnabled *bool `json:"isCollectDatabaseSpecificsStatisticsEnabled,omitempty"`
IsDataExplorerEnabled *bool `json:"isDataExplorerEnabled,omitempty"`
IsExtendedStorageSizesEnabled *bool `json:"isExtendedStorageSizesEnabled,omitempty"`
IsPerformanceAdvisorEnabled *bool `json:"isPerformanceAdvisorEnabled,omitempty"`
IsRealtimePerformancePanelEnabled *bool `json:"isRealtimePerformancePanelEnabled,omitempty"`
IsSchemaAdvisorEnabled *bool `json:"isSchemaAdvisorEnabled,omitempty"`
Expand Down
9 changes: 7 additions & 2 deletions mongodbatlas/project_settings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ func TestProjects_GetProjectSettings(t *testing.T) {
mux.HandleFunc(fmt.Sprintf("/api/atlas/v1.0/groups/%s/settings", groupID), func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodGet)
_, _ = fmt.Fprint(w, `{
"isCollectDatabaseSpecificsStatisticsEnabled": true,
"isCollectDatabaseSpecificsStatisticsEnabled": true,
"isDataExplorerEnabled": true,
"isExtendedStorageSizesEnabled": true,
"isPerformanceAdvisorEnabled": true,
"isRealtimePerformancePanelEnabled": true,
"isSchemaAdvisorEnabled": true
Expand All @@ -45,6 +46,7 @@ func TestProjects_GetProjectSettings(t *testing.T) {
expected := &ProjectSettings{
IsCollectDatabaseSpecificsStatisticsEnabled: pointer(true),
IsDataExplorerEnabled: pointer(true),
IsExtendedStorageSizesEnabled: pointer(true),
IsPerformanceAdvisorEnabled: pointer(true),
IsRealtimePerformancePanelEnabled: pointer(true),
IsSchemaAdvisorEnabled: pointer(true),
Expand All @@ -62,8 +64,9 @@ func TestProjects_UpdateProjectSettings(t *testing.T) {
mux.HandleFunc(fmt.Sprintf("/api/atlas/v1.0/groups/%s/settings", groupID), func(w http.ResponseWriter, r *http.Request) {
testMethod(t, r, http.MethodPatch)
_, _ = fmt.Fprint(w, `{
"isCollectDatabaseSpecificsStatisticsEnabled": true,
"isCollectDatabaseSpecificsStatisticsEnabled": true,
"isDataExplorerEnabled": true,
"isExtendedStorageSizesEnabled": true,
"isPerformanceAdvisorEnabled": true,
"isRealtimePerformancePanelEnabled": true,
"isSchemaAdvisorEnabled": true
Expand All @@ -73,6 +76,7 @@ func TestProjects_UpdateProjectSettings(t *testing.T) {
body := &ProjectSettings{
IsCollectDatabaseSpecificsStatisticsEnabled: pointer(true),
IsDataExplorerEnabled: pointer(true),
IsExtendedStorageSizesEnabled: pointer(true),
IsPerformanceAdvisorEnabled: pointer(true),
IsRealtimePerformancePanelEnabled: pointer(true),
IsSchemaAdvisorEnabled: pointer(true),
Expand All @@ -86,6 +90,7 @@ func TestProjects_UpdateProjectSettings(t *testing.T) {
expected := &ProjectSettings{
IsCollectDatabaseSpecificsStatisticsEnabled: pointer(true),
IsDataExplorerEnabled: pointer(true),
IsExtendedStorageSizesEnabled: pointer(true),
IsPerformanceAdvisorEnabled: pointer(true),
IsRealtimePerformancePanelEnabled: pointer(true),
IsSchemaAdvisorEnabled: pointer(true),
Expand Down

0 comments on commit 728e02c

Please sign in to comment.