mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
feat: Add --raw-url to coder server postgres-builtin-* commands (#5478)
This commit is contained in:
committed by
GitHub
parent
50dfc2082b
commit
c7ce3e70da
@ -118,6 +118,19 @@ func TestServer(t *testing.T) {
|
||||
|
||||
pty.ExpectMatch("psql")
|
||||
})
|
||||
t.Run("BuiltinPostgresURLRaw", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
root, _ := clitest.New(t, "server", "postgres-builtin-url", "--raw-url")
|
||||
pty := ptytest.New(t)
|
||||
root.SetOutput(pty.Output())
|
||||
err := root.Execute()
|
||||
require.NoError(t, err)
|
||||
|
||||
got := pty.ReadLine()
|
||||
if !strings.HasPrefix(got, "postgres://") {
|
||||
t.Fatalf("expected postgres URL to start with \"postgres://\", got %q", got)
|
||||
}
|
||||
})
|
||||
|
||||
// Validate that a warning is printed that it may not be externally
|
||||
// reachable.
|
||||
|
Reference in New Issue
Block a user