Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/config/nodejs-dev.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
"auth",
"batch",
"cloud-language",
"cloud-sql/mysql/mysql",
"cloud-sql/mysql/mysql2",
"cloud-sql/postgres/knex",
"cloud-sql/sqlserver/mssql",
"cloud-sql/sqlserver/tedious",
"cloud-tasks/snippets",
"cloud-tasks/tutorial-gcf/app",
"cloud-tasks/tutorial-gcf/function",
Expand Down
9 changes: 5 additions & 4 deletions .github/config/nodejs-prod.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,15 @@
"memorystore/redis", // parent directory
"recaptcha_enterprise/demosite/app", // no tests exist

// TODO: fix these
"ai-platform/snippets", // PERMISSION_DENIED: Permission denied: Consumer 'projects/undefined' has been suspended.
"automl", // (untested) FAILED_PRECONDITION: Google Cloud AutoML Natural Language was retired on March 15, 2024. Please migrate to Vertex AI instead
"cloud-sql/mysql/mysql", // (untested) Error: expected 200 "OK", got 500 "Internal Server Error"
// TEMP DISABLE during debugging.
"cloud-sql/mysql/mysql2", // (untested) Error: Cannot find module './connect-connector-with-iam-authn.js'
"cloud-sql/postgres/knex", // (untested) CloudSQLConnectorError: Malformed instance connection name provided: expected format of "PROJECT:REGION:INSTANCE", got undefined
"cloud-sql/sqlserver/mssql", // (untested) TypeError: The "config.server" property is required and must be of type string.
"cloud-sql/sqlserver/tedious", // (untested) TypeError: The "config.server" property is required and must be of type string.

// TODO: fix these
"ai-platform/snippets", // PERMISSION_DENIED: Permission denied: Consumer 'projects/undefined' has been suspended.
"automl", // (untested) FAILED_PRECONDITION: Google Cloud AutoML Natural Language was retired on March 15, 2024. Please migrate to Vertex AI instead
"compute", // GoogleError: The resource 'projects/long-door-651/zones/us-central1-a/disks/disk-from-pool-name' was not found
"dataproc", // GoogleError: Error submitting create cluster request: Multiple validation errors
"datastore/functions", // [ERR_REQUIRE_ESM]: require() of ES Module
Expand Down
10 changes: 10 additions & 0 deletions cloud-sql/mysql/mysql/ci-setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"env": {
"INSTANCE_HOST": "127.0.0.1",
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:mysql-ci",
"DB_NAME": "kokoro_ci",
"DB_USER": "kokoro_ci"
},
"secrets": {
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password" }
}
2 changes: 1 addition & 1 deletion cloud-sql/mysql/mysql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit",
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit",
"system-test-unix": "c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit",
"test": "npm run system-test && npm run system-test-unix"
},
Expand Down
19 changes: 19 additions & 0 deletions cloud-sql/mysql/mysql/test/proxy-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Proof of concept: setting up proxy

curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
chmod +x cloud-sql-proxy
./cloud-sql-proxy $INSTANCE_CONNECTION_NAME &
9 changes: 9 additions & 0 deletions cloud-sql/mysql/mysql2/ci-setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"env": {
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:mysql-ci",
"DB_NAME": "kokoro_ci",
"DB_USER": "kokoro_ci"
},
"secrets": {
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password" }
}
2 changes: 1 addition & 1 deletion cloud-sql/mysql/mysql2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'use strict';

const express = require('express');
const createConnectorIAMAuthnPool = require('./connect-connector-with-iam-authn.js');
const createConnectorIAMAuthnPool = require('./connect-connector-auto-iam-authn.js');
const createConnectorPool = require('./connect-connector.js');
const createTcpPool = require('./connect-tcp.js');
const createUnixSocketPool = require('./connect-unix.js');
Expand Down
9 changes: 9 additions & 0 deletions cloud-sql/postgres/knex/ci-setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"env": {
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:postgres-ci",
"DB_NAME": "kokoro_ci",
"DB_USER": "kokoro_ci"
},
"secrets": {
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password" }
}
2 changes: 1 addition & 1 deletion cloud-sql/postgres/knex/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"start": "node server/server.js",
"start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &",
"test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit"
"test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit"
},
"dependencies": {
"@google-cloud/cloud-sql-connector": "^1.0.0",
Expand Down
9 changes: 9 additions & 0 deletions cloud-sql/sqlserver/mssql/ci-setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"env": {
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:mssql-ci",
"DB_NAME": "kokoro_ci",
"DB_USER": "kokoro_ci"
},
"secrets": {
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password" }
}
2 changes: 1 addition & 1 deletion cloud-sql/sqlserver/mssql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
19 changes: 19 additions & 0 deletions cloud-sql/sqlserver/mssql/test/proxy-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Proof of concept: setting up proxy

curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
chmod +x cloud-sql-proxy
cloud-sql-proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &
9 changes: 9 additions & 0 deletions cloud-sql/sqlserver/tedious/ci-setup.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"env": {
"CLOUD_SQL_CONNECTION_NAME": "nodejs-docs-samples-tests:us-central1:mssql-ci",
"DB_NAME": "kokoro_ci",
"DB_USER": "kokoro_ci"
},
"secrets": {
"DB_PASSWORD": "nodejs-docs-samples-tests/nodejs-docs-samples-sql-password" }
}
2 changes: 1 addition & 1 deletion cloud-sql/sqlserver/tedious/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"start": "node server/server.js",
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
"test": "npm run system-test"
},
"dependencies": {
Expand Down
19 changes: 19 additions & 0 deletions cloud-sql/sqlserver/tedious/test/proxy-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Proof of concept: setting up proxy

curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
chmod +x cloud-sql-proxy
cloud-sql-proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &
2 changes: 1 addition & 1 deletion run/idp-sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"scripts": {
"start": "node index.js",
"unit-test": "c8 mocha -p -j 2 test/app.test.js --timeout=120000 --exit",
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit",
"system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit",
"all-test": "npm run unit-test && npm run system-test",
"test": "npm -- run all-test"
},
Expand Down
Loading