From 486ba80fe882240c52127587857971d8df3ca366 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari Date: Fri, 26 Sep 2025 17:56:20 -0700 Subject: [PATCH] we need to test passwords outside tls too --- test/docker/docker-compose.yml | 1 + test/js/sql/sql-mysql.helpers.test.ts | 2 +- test/js/sql/sql-mysql.test.ts | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/docker/docker-compose.yml b/test/docker/docker-compose.yml index e0476062f6..d505cabfeb 100644 --- a/test/docker/docker-compose.yml +++ b/test/docker/docker-compose.yml @@ -80,6 +80,7 @@ services: image: mysql:8.4 environment: MYSQL_ALLOW_EMPTY_PASSWORD: "yes" + MYSQL_ROOT_PASSWORD: "bun123456@#$%^&*()" MYSQL_DATABASE: bun_sql_test ports: - target: 3306 diff --git a/test/js/sql/sql-mysql.helpers.test.ts b/test/js/sql/sql-mysql.helpers.test.ts index dc5d91e3cc..839524869a 100644 --- a/test/js/sql/sql-mysql.helpers.test.ts +++ b/test/js/sql/sql-mysql.helpers.test.ts @@ -13,7 +13,7 @@ describeWithContainer( container => { // Use a getter to avoid reading port/host at define time const getOptions = () => ({ - url: `mysql://root@${container.host}:${container.port}/bun_sql_test`, + url: `mysql://root:${encodeURIComponent("bun123456@#$%^&*()")}@${container.host}:${container.port}/bun_sql_test`, max: 1, bigint: true, }); diff --git a/test/js/sql/sql-mysql.test.ts b/test/js/sql/sql-mysql.test.ts index 974b06247e..d6878ca61b 100644 --- a/test/js/sql/sql-mysql.test.ts +++ b/test/js/sql/sql-mysql.test.ts @@ -40,9 +40,8 @@ if (isDockerEnabled()) { }, container => { let sql: SQL; - const password = image.image === "mysql_plain" ? "" : "bun123456@#$%^&*()"; const getOptions = (): Bun.SQL.Options => ({ - url: `mysql://root:${encodeURIComponent(password)}@${container.host}:${container.port}/bun_sql_test`, + url: `mysql://root:${encodeURIComponent("bun123456@#$%^&*()")}@${container.host}:${container.port}/bun_sql_test`, max: 1, tls: image.name === "MySQL with TLS"