Skip to content

Commit

Permalink
INTMDB-801: Add Missing fields in the data federation store struct (#478
Browse files Browse the repository at this point in the history
)
  • Loading branch information
andreaangiolillo committed May 15, 2023
1 parent 0f62064 commit 94881a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
7 changes: 6 additions & 1 deletion mongodbatlas/data_federation.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,21 @@ type DataFederationDatabaseView struct {
// DataFederationStore represents data stores for the data federation.
type DataFederationStore struct {
ReadPreference *ReadPreference `json:"readPreference,omitempty"`
IncludeTags *bool `json:"includeTags,omitempty"`
AdditionalStorageClasses []*string `json:"additionalStorageClasses,omitempty"`
Urls []*string `json:"urls,omitempty"`
Name string `json:"name,omitempty"`
Provider string `json:"provider,omitempty"`
ClusterName string `json:"clusterName,omitempty"`
ClusterID string `json:"clusterId,omitempty"`
Region string `json:"region,omitempty"`
Bucket string `json:"bucket,omitempty"`
Prefix string `json:"prefix,omitempty"`
Delimiter string `json:"delimiter,omitempty"`
ProjectID string `json:"projectId,omitempty"`
DefaultFormat string `json:"defaultFormat,omitempty"`
IncludeTags *bool `json:"includeTags,omitempty"`
Public *bool `json:"public,omitempty"`
AllowInsecure *bool `json:"allowInsecure,omitempty"`
}

// ReadPreference describes how to route read requests to the cluster.
Expand Down
14 changes: 13 additions & 1 deletion mongodbatlas/data_federation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,13 @@ func TestDataFederation_Get(t *testing.T) {
"prefix": "/metrics",
"delimiter": "/",
"includeTags": false,
"additionalStorageClasses" : ["STANDARD_IA"]
"additionalStorageClasses" : ["STANDARD_IA"],
"clusterName": "test",
"clusterId": "test",
"public": false,
"allowInsecure": false,
"defaultFormat": "test",
"urls": ["test"]
}
]
}
Expand Down Expand Up @@ -308,6 +314,12 @@ func TestDataFederation_Get(t *testing.T) {
Delimiter: "/",
IncludeTags: pointer(false),
AdditionalStorageClasses: []*string{pointer("STANDARD_IA")},
ClusterName: "test",
ClusterID: "test",
DefaultFormat: "test",
Public: pointer(false),
AllowInsecure: pointer(false),
Urls: []*string{pointer("test")},
},
},
},
Expand Down

0 comments on commit 94881a2

Please sign in to comment.