Skip to content

Commit 1cb81f1

Browse files
committed
add static proxy setup file
1 parent f034932 commit 1cb81f1

File tree

8 files changed

+80
-4
lines changed

8 files changed

+80
-4
lines changed

cloud-sql/mysql/mysql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"start": "node server/server.js",
16-
"system-test": "c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit",
16+
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/server.test.js --timeout=60000 --exit",
1717
"system-test-unix": "c8 mocha -p -j 2 test/server-unix.test.js --timeout=60000 --exit",
1818
"test": "npm run system-test && npm run system-test-unix"
1919
},
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Proof of concept: setting up proxy
16+
17+
curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
18+
chmod +x cloud-sql-proxy
19+
cloud-sql-proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &

cloud-sql/postgres/knex/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"scripts": {
1616
"start": "node server/server.js",
1717
"start-proxy": "! pgrep cloud_sql_proxy > /dev/null && cloud_sql_proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &",
18-
"test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit"
18+
"test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit"
1919
},
2020
"dependencies": {
2121
"@google-cloud/cloud-sql-connector": "^1.0.0",
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Proof of concept: setting up proxy
16+
17+
curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
18+
chmod +x cloud-sql-proxy
19+
cloud-sql-proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &

cloud-sql/sqlserver/mssql/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"start": "node server/server.js",
16-
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
16+
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
1717
"test": "npm run system-test"
1818
},
1919
"dependencies": {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Proof of concept: setting up proxy
16+
17+
curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
18+
chmod +x cloud-sql-proxy
19+
cloud-sql-proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &

cloud-sql/sqlserver/tedious/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"start": "node server/server.js",
16-
"system-test": "c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
16+
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/*.test.js --timeout=60000 --exit",
1717
"test": "npm run system-test"
1818
},
1919
"dependencies": {
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Proof of concept: setting up proxy
16+
17+
curl -o cloud-sql-proxy https://storage.googleapis.com/cloud-sql-connectors/cloud-sql-proxy/v2.15.1/cloud-sql-proxy.linux.amd64
18+
chmod +x cloud-sql-proxy
19+
cloud-sql-proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &

0 commit comments

Comments
 (0)