fix: standardize on CODER_PG_CONNECTION_URL (#7781)

Fixes #7513.
This commit is contained in:
Asher
2023-06-01 15:02:29 -08:00
committed by GitHub
parent 613f90cf2b
commit 9704945428
4 changed files with 7 additions and 7 deletions

View File

@@ -238,7 +238,7 @@ func (r *RootCmd) newCreateAdminUserCommand() *clibase.Cmd {
createAdminUserCommand.Options.Add(
clibase.Option{
Env: "CODER_POSTGRES_URL",
Env: "CODER_PG_CONNECTION_URL",
Flag: "postgres-url",
Description: "URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).",
Value: clibase.StringOf(&newUserDBURL),

View File

@@ -157,7 +157,7 @@ func TestServerCreateAdminUser(t *testing.T) {
defer cancel()
inv, _ := clitest.New(t, "server", "create-admin-user")
inv.Environ.Set("CODER_POSTGRES_URL", connectionURL)
inv.Environ.Set("CODER_PG_CONNECTION_URL", connectionURL)
inv.Environ.Set("CODER_SSH_KEYGEN_ALGORITHM", "ed25519")
inv.Environ.Set("CODER_USERNAME", username)
inv.Environ.Set("CODER_EMAIL", email)

View File

@@ -12,7 +12,7 @@ to every organization.
The password of the new user. If not specified, you will be prompted
via stdin.
--postgres-url string, $CODER_POSTGRES_URL
--postgres-url string, $CODER_PG_CONNECTION_URL
URL of a PostgreSQL database. If empty, the built-in PostgreSQL
deployment will be used (Coder must not be already running in this
case).

View File

@@ -32,10 +32,10 @@ The password of the new user. If not specified, you will be prompted via stdin.
### --postgres-url
| | |
| ----------- | -------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_POSTGRES_URL</code> |
| | |
| ----------- | ------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PG_CONNECTION_URL</code> |
URL of a PostgreSQL database. If empty, the built-in PostgreSQL deployment will be used (Coder must not be already running in this case).