diff --git a/get/mysql_test.go b/get/mysql_test.go index 021980c..2738ebe 100644 --- a/get/mysql_test.go +++ b/get/mysql_test.go @@ -33,32 +33,32 @@ func TestMySQL(t *testing.T) { }, { name: "single", - instances: map[string]storage.MySQLParameters{"test": {MachineType: infra.MachineType("nine-standard-1")}}, - wantContain: []string{"nine-standard-1"}, + instances: map[string]storage.MySQLParameters{"test": {MachineType: infra.MachineType("nine-db-prod-s")}}, + wantContain: []string{"nine-db-prod-s"}, }, { name: "multiple", instances: map[string]storage.MySQLParameters{ - "test1": {MachineType: infra.MachineType("nine-standard-1")}, - "test2": {MachineType: infra.MachineType("nine-standard-2")}, - "test3": {MachineType: infra.MachineType("nine-standard-4")}, + "test1": {MachineType: infra.MachineType("nine-db-prod-s")}, + "test2": {MachineType: infra.MachineType("nine-db-prod-m")}, + "test3": {MachineType: infra.MachineType("nine-db-prod-l")}, }, - wantContain: []string{"nine-standard-1", "nine-standard-2", "test3"}, + wantContain: []string{"nine-db-prod-s", "nine-db-prod-m", "test3"}, }, { name: "get-by-name", instances: map[string]storage.MySQLParameters{ - "test1": {MachineType: infra.MachineType("nine-standard-1")}, - "test2": {MachineType: infra.MachineType("nine-standard-2")}, + "test1": {MachineType: infra.MachineType("nine-db-prod-s")}, + "test2": {MachineType: infra.MachineType("nine-db-prod-m")}, }, get: mySQLCmd{resourceCmd: resourceCmd{Name: "test1"}}, - wantContain: []string{"test1", "nine-standard-1"}, + wantContain: []string{"test1", "nine-db-prod-s"}, }, { name: "show-password", instances: map[string]storage.MySQLParameters{ - "test1": {MachineType: infra.MachineType("nine-standard-1")}, - "test2": {MachineType: infra.MachineType("nine-standard-2")}, + "test1": {MachineType: infra.MachineType("nine-db-prod-s")}, + "test2": {MachineType: infra.MachineType("nine-db-prod-m")}, }, get: mySQLCmd{resourceCmd: resourceCmd{Name: "test2"}, PrintPassword: true}, wantContain: []string{"test2-topsecret"}, diff --git a/get/postgres_test.go b/get/postgres_test.go index 5120b26..b12d6e8 100644 --- a/get/postgres_test.go +++ b/get/postgres_test.go @@ -33,32 +33,32 @@ func TestPostgres(t *testing.T) { }, { name: "single", - instances: map[string]storage.PostgresParameters{"test": {MachineType: infra.MachineType("nine-standard-1")}}, - wantContain: []string{"nine-standard-1"}, + instances: map[string]storage.PostgresParameters{"test": {MachineType: infra.MachineType("nine-db-prod-s")}}, + wantContain: []string{"nine-db-prod-s"}, }, { name: "multiple", instances: map[string]storage.PostgresParameters{ - "test1": {MachineType: infra.MachineType("nine-standard-1")}, - "test2": {MachineType: infra.MachineType("nine-standard-2")}, - "test3": {MachineType: infra.MachineType("nine-standard-4")}, + "test1": {MachineType: infra.MachineType("nine-db-prod-s")}, + "test2": {MachineType: infra.MachineType("nine-db-prod-m")}, + "test3": {MachineType: infra.MachineType("nine-db-prod-l")}, }, - wantContain: []string{"nine-standard-1", "nine-standard-2", "test3"}, + wantContain: []string{"nine-db-prod-s", "nine-db-prod-m", "test3"}, }, { name: "get-by-name", instances: map[string]storage.PostgresParameters{ - "test1": {MachineType: infra.MachineType("nine-standard-1")}, - "test2": {MachineType: infra.MachineType("nine-standard-2")}, + "test1": {MachineType: infra.MachineType("nine-db-prod-s")}, + "test2": {MachineType: infra.MachineType("nine-db-prod-m")}, }, get: postgresCmd{resourceCmd: resourceCmd{Name: "test1"}}, - wantContain: []string{"test1", "nine-standard-1"}, + wantContain: []string{"test1", "nine-db-prod-s"}, }, { name: "show-password", instances: map[string]storage.PostgresParameters{ - "test1": {MachineType: infra.MachineType("nine-standard-1")}, - "test2": {MachineType: infra.MachineType("nine-standard-2")}, + "test1": {MachineType: infra.MachineType("nine-db-prod-s")}, + "test2": {MachineType: infra.MachineType("nine-db-prod-m")}, }, get: postgresCmd{resourceCmd: resourceCmd{Name: "test2"}, PrintPassword: true}, wantContain: []string{"test2-topsecret"}, diff --git a/update/mysql_test.go b/update/mysql_test.go index 6f993b8..862b107 100644 --- a/update/mysql_test.go +++ b/update/mysql_test.go @@ -27,14 +27,14 @@ func TestMySQL(t *testing.T) { }, { name: "increase-machineType", - update: mySQLCmd{MachineType: ptr.To(infra.MachineType("nine-standard-1"))}, - want: storage.MySQLParameters{MachineType: infra.MachineType("nine-standard-1")}, + update: mySQLCmd{MachineType: ptr.To(infra.MachineType("nine-db-prod-s"))}, + want: storage.MySQLParameters{MachineType: infra.MachineType("nine-db-prod-s")}, }, { name: "decrease-machineType", - create: storage.MySQLParameters{MachineType: infra.MachineType("nine-standard-2")}, - update: mySQLCmd{MachineType: ptr.To(infra.MachineType("nine-standard-1"))}, - want: storage.MySQLParameters{MachineType: infra.MachineType("nine-standard-1")}, + create: storage.MySQLParameters{MachineType: infra.MachineType("nine-db-prod-m")}, + update: mySQLCmd{MachineType: ptr.To(infra.MachineType("nine-db-prod-s"))}, + want: storage.MySQLParameters{MachineType: infra.MachineType("nine-db-prod-s")}, }, { name: "sqlMode-no-mode-set-initially", @@ -91,8 +91,8 @@ func TestMySQL(t *testing.T) { { name: "multi-update", create: storage.MySQLParameters{AllowedCIDRs: []meta.IPv4CIDR{"0.0.0.0/0"}}, - update: mySQLCmd{MachineType: ptr.To(infra.MachineType("nine-standard-1"))}, - want: storage.MySQLParameters{MachineType: infra.MachineType("nine-standard-1"), AllowedCIDRs: []meta.IPv4CIDR{meta.IPv4CIDR("0.0.0.0/0")}}, + update: mySQLCmd{MachineType: ptr.To(infra.MachineType("nine-db-prod-s"))}, + want: storage.MySQLParameters{MachineType: infra.MachineType("nine-db-prod-s"), AllowedCIDRs: []meta.IPv4CIDR{meta.IPv4CIDR("0.0.0.0/0")}}, }, } for _, tt := range tests { diff --git a/update/postgres_test.go b/update/postgres_test.go index 7620a70..9529b61 100644 --- a/update/postgres_test.go +++ b/update/postgres_test.go @@ -27,14 +27,14 @@ func TestPostgres(t *testing.T) { }, { name: "increase-machineType", - update: postgresCmd{MachineType: ptr.To(infra.MachineType("nine-standard-1"))}, - want: storage.PostgresParameters{MachineType: infra.MachineType("nine-standard-1")}, + update: postgresCmd{MachineType: ptr.To(infra.MachineType("nine-db-prod-s"))}, + want: storage.PostgresParameters{MachineType: infra.MachineType("nine-db-prod-s")}, }, { name: "decrease-machineType", - create: storage.PostgresParameters{MachineType: infra.MachineType("nine-standard-2")}, - update: postgresCmd{MachineType: ptr.To(infra.MachineType("nine-standard-1"))}, - want: storage.PostgresParameters{MachineType: infra.MachineType("nine-standard-1")}, + create: storage.PostgresParameters{MachineType: infra.MachineType("nine-db-prod-m")}, + update: postgresCmd{MachineType: ptr.To(infra.MachineType("nine-db-prod-s"))}, + want: storage.PostgresParameters{MachineType: infra.MachineType("nine-db-prod-s")}, }, { name: "sshKeys", @@ -60,8 +60,8 @@ func TestPostgres(t *testing.T) { { name: "multi-update", create: storage.PostgresParameters{AllowedCIDRs: []meta.IPv4CIDR{"0.0.0.0/0"}}, - update: postgresCmd{MachineType: ptr.To(infra.MachineType("nine-standard-1"))}, - want: storage.PostgresParameters{MachineType: infra.MachineType("nine-standard-1"), AllowedCIDRs: []meta.IPv4CIDR{meta.IPv4CIDR("0.0.0.0/0")}}, + update: postgresCmd{MachineType: ptr.To(infra.MachineType("nine-db-prod-s"))}, + want: storage.PostgresParameters{MachineType: infra.MachineType("nine-db-prod-s"), AllowedCIDRs: []meta.IPv4CIDR{meta.IPv4CIDR("0.0.0.0/0")}}, }, } for _, tt := range tests {