Skip to content

Commit 0450051

Browse files
committed
use an interesting pg_role
1 parent c3d2b83 commit 0450051

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cmd/dbos/cli_integration_test.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,14 @@ func getDatabaseURL(dbRole string) string {
4545
if password == "" {
4646
password = "dbos"
4747
}
48-
return fmt.Sprintf("postgres://%s:%s@localhost:5432/dbos?sslmode=disable", dbRole, url.QueryEscape(password))
48+
dsn := &url.URL{
49+
Scheme: "postgres",
50+
Host: "localhost:5432",
51+
Path: "/dbos",
52+
RawQuery: "sslmode=disable",
53+
}
54+
dsn.User = url.UserPassword(dbRole, password)
55+
return dsn.String()
4956
}
5057

5158
// TestCLIWorkflow provides comprehensive integration testing of the DBOS CLI
@@ -84,7 +91,7 @@ func TestCLIWorkflow(t *testing.T) {
8491
{
8592
name: "FunnySchema",
8693
schemaName: "F8nny_sCHem@-n@m3",
87-
dbRole: "notpostgres",
94+
dbRole: "User [email protected]#$%&!",
8895
args: []string{"--schema", "F8nny_sCHem@-n@m3"},
8996
},
9097
}

0 commit comments

Comments
 (0)