Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

database: Add Size to DatabaseReplica struct #706

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,7 @@ type DatabaseReplica struct {
PrivateNetworkUUID string `json:"private_network_uuid,omitempty"`
Tags []string `json:"tags,omitempty"`
StorageSizeMib uint64 `json:"storage_size_mib,omitempty"`
Size string `json:"size"`
}

// DatabasePool represents a database connection pool
Expand Down
12 changes: 9 additions & 3 deletions databases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1568,6 +1568,7 @@ func TestDatabases_GetReplica(t *testing.T) {
PrivateNetworkUUID: "deadbeef-dead-4aa5-beef-deadbeef347d",
Tags: []string{"production", "staging"},
StorageSizeMib: 51200,
Size: "db-s-1vcpu-1gb",
}

body := `
Expand Down Expand Up @@ -1598,7 +1599,8 @@ func TestDatabases_GetReplica(t *testing.T) {
},
"private_network_uuid": "deadbeef-dead-4aa5-beef-deadbeef347d",
"tags": ["production", "staging"],
"storage_size_mib": 51200
"storage_size_mib": 51200,
"size": "db-s-1vcpu-1gb"
}
}
`
Expand Down Expand Up @@ -1649,6 +1651,7 @@ func TestDatabases_ListReplicas(t *testing.T) {
PrivateNetworkUUID: "deadbeef-dead-4aa5-beef-deadbeef347d",
Tags: []string{"production", "staging"},
StorageSizeMib: 51200,
Size: "db-s-1vcpu-1gb",
},
}

Expand Down Expand Up @@ -1679,7 +1682,8 @@ func TestDatabases_ListReplicas(t *testing.T) {
},
"private_network_uuid": "deadbeef-dead-4aa5-beef-deadbeef347d",
"tags": ["production", "staging"],
"storage_size_mib": 51200
"storage_size_mib": 51200,
"size": "db-s-1vcpu-1gb"
}]
}
`
Expand Down Expand Up @@ -1729,6 +1733,7 @@ func TestDatabases_CreateReplica(t *testing.T) {
PrivateNetworkUUID: "deadbeef-dead-4aa5-beef-deadbeef347d",
Tags: []string{"production", "staging"},
StorageSizeMib: 51200,
Size: "db-s-2vcpu-4gb",
}

body := `
Expand Down Expand Up @@ -1758,7 +1763,8 @@ func TestDatabases_CreateReplica(t *testing.T) {
},
"private_network_uuid": "deadbeef-dead-4aa5-beef-deadbeef347d",
"tags": ["production", "staging"],
"storage_size_mib": 51200
"storage_size_mib": 51200,
"size": "db-s-2vcpu-4gb"
}
}
`
Expand Down
Loading