From dca98441487a3475a3601cff8f47f8cc004f35d3 Mon Sep 17 00:00:00 2001 From: Ryan Moore Date: Wed, 7 Sep 2022 13:29:58 -0600 Subject: [PATCH] adding the replica id to the database replica model (#549) Co-authored-by: Ryan Moore --- databases.go | 1 + databases_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/databases.go b/databases.go index ffa452b2..69bd6c9f 100644 --- a/databases.go +++ b/databases.go @@ -268,6 +268,7 @@ type DatabaseDB struct { // DatabaseReplica represents a read-only replica of a particular database type DatabaseReplica struct { + ID string `json:"id"` Name string `json:"name"` Connection *DatabaseConnection `json:"connection"` PrivateConnection *DatabaseConnection `json:"private_connection,omitempty"` diff --git a/databases_test.go b/databases_test.go index 8798990e..ab20c7e9 100644 --- a/databases_test.go +++ b/databases_test.go @@ -1068,6 +1068,7 @@ func TestDatabases_GetReplica(t *testing.T) { createdAt := time.Date(2019, 01, 01, 0, 0, 0, 0, time.UTC) want := &DatabaseReplica{ + ID: "326f188b-5dd1-45fc-9584-62ad553107cd", Name: "pool", Region: "nyc1", Status: "online", @@ -1097,6 +1098,7 @@ func TestDatabases_GetReplica(t *testing.T) { body := ` { "replica": { + "id": "326f188b-5dd1-45fc-9584-62ad553107cd", "name": "pool", "region": "nyc1", "status": "online",