Skip to content

Commit 43b54f0

Browse files
ggreerpquerna
authored andcommitted
Add failing test case.
1 parent 73421dd commit 43b54f0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pkg/database/database_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ func Test_expandDSN(t *testing.T) {
105105
dsn: "mysql://admin:${DB_PASSWORD}@localhost:3306/dbname",
106106
want: "mysql://admin:p%40ss%23123@localhost:3306/dbname",
107107
},
108+
{
109+
name: "Port",
110+
env: map[string]string{
111+
"DB_PORT": "3306",
112+
},
113+
dsn: "mysql://user:password@localhost:${DB_PORT}/dbname",
114+
want: "mysql://user:password@localhost:3306/dbname",
115+
},
108116
{
109117
name: "Password with multiple special characters",
110118
env: map[string]string{

0 commit comments

Comments
 (0)