Skip to content

Commit ecbf8c9

Browse files
Remove EA language from pg create (#513)
GitOrigin-RevId: e0ce1b8101dca0fcd5acd26b2fb7220c1f7251b3
1 parent c398207 commit ecbf8c9

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

pkg/tui/views/pgcreate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package views
22

3-
// PostgresCreateModel is an inline interactive wizard for `render ea pg create`.
3+
// PostgresCreateModel is an inline interactive wizard for `render pg create`.
44
// The outer tea.Model owns step orchestration via a declarative step pipeline;
55
// each individual step is rendered by a huh.Form composed as a child tea.Model.
66
//
@@ -782,7 +782,7 @@ func renderPostgresCreateSuccess(pg *client.PostgresDetail) string {
782782
Render("Success!")
783783

784784
return fmt.Sprintf(
785-
"\n%s\n\nDatabase %s was created.\n\nRun `render ea pg get %s` to check if it's ready yet.\n",
785+
"\n%s\n\nDatabase %s was created.\n\nRun `render pg get %s` to check if it's ready yet.\n",
786786
success,
787787
rstrings.ResourceLabel(pg.Name, pg.Id),
788788
pg.Name,

pkg/tui/views/pgcreate_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package views
22

33
import (
4+
"bytes"
45
"context"
56
"testing"
67

@@ -118,7 +119,10 @@ func TestPostgresCreateWizardHappyPathCreatesDatabase(t *testing.T) {
118119
tm.Send(tea.KeyMsg{Type: tea.KeyRight})
119120
tm.Send(tea.KeyMsg{Type: tea.KeyEnter}) // yes
120121

121-
testhelper.WaitForContains(t, tm.Output(), "render ea pg get web-app-db")
122+
teatest.WaitFor(t, tm.Output(), func(b []byte) bool {
123+
return bytes.Contains(b, []byte("render pg get web-app-db")) &&
124+
!bytes.Contains(b, []byte("render ea pg"))
125+
})
122126

123127
require.Len(t, server.Postgres.Instances, 1)
124128
pg := server.Postgres.Instances[0]

pkg/types/postgres/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
)
88

99
// CreatePostgresInput is the raw command input parsed from Cobra flags for
10-
// `render ea pg create`. Every field is optional: a user can run the command
10+
// `render pg create`. Every field is optional: a user can run the command
1111
// with no flags and get a working database. Defaults are filled in
1212
// client-side (name, plan, version, disk size) and server-side
1313
// (region, db name, db user, etc.).

pkg/types/postgres/create_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestCreatePostgresInputValidate(t *testing.T) {
1111
// A zero-value input must pass validation so users can run
12-
// `render ea pg create` with no flags and get a working database.
12+
// `render pg create` with no flags and get a working database.
1313
// Defaults are filled in client-side (name, plan, version, disk size)
1414
// and server-side (region, db name, etc.).
1515
t.Run("zero-value input is valid", func(t *testing.T) {

0 commit comments

Comments
 (0)