Skip to content

Commit 0bbd11b

Browse files
authored
Merge branch 'main' into sql-tests-2
2 parents 6a98c4d + cbfe3c1 commit 0bbd11b

File tree

9 files changed

+36
-59
lines changed

9 files changed

+36
-59
lines changed

.github/config/nodejs-dev.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
".github/ISSUE_TEMPLATE/",
3737
".github/PULL_REQUEST_TEMPLATE.md",
3838
".github/auto-label.yaml",
39-
".github/blunderbuss.yaml",
39+
".github/blunderbuss.yml",
4040
".github/flakybot.yaml",
41-
".github/header-checker-lint.yaml",
41+
".github/header-checker-lint.yml",
4242
".github/scripts/",
4343
".github/snippet-bot.yml",
4444
".github/trusted-contribution.yml",

.github/config/nodejs-prod.jsonc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
".github/ISSUE_TEMPLATE/",
3737
".github/PULL_REQUEST_TEMPLATE.md",
3838
".github/auto-label.yaml",
39-
".github/blunderbuss.yaml",
39+
".github/blunderbuss.yml",
4040
".github/flakybot.yaml",
41-
".github/header-checker-lint.yaml",
41+
".github/header-checker-lint.yml",
4242
".github/scripts/",
4343
".github/snippet-bot.yml",
4444
".github/trusted-contribution.yml",

recaptcha_enterprise/demosite/app/controllers/controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ const onCommentSubmit = async (req, res) => {
249249
};
250250

251251
// Classify the action as BAD/ NOT_BAD based on conditions specified.
252+
// See https://cloud.google.com/recaptcha/docs/interpret-assessment-website
252253
const checkForBadAction = function (assessmentResponse, recaptchaAction) {
253254
let label = Label.NOT_BAD;
254255
let reason = '';

run/idp-sql/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 index.js",
1717
"unit-test": "c8 mocha -p -j 2 test/app.test.js --timeout=120000 --exit",
18-
"system-test": "test/proxy-setup.sh && c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit",
18+
"system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=1800000 --exit",
1919
"all-test": "npm run unit-test && npm run system-test",
2020
"test": "npm -- run all-test"
2121
},

run/idp-sql/test/proxy-setup.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

run/markdown-preview/editor/test/retry.sh

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,32 @@
3333
# If first cmd executes successfully then execute second cmd
3434
runIfSuccessful() {
3535
echo "running: $1"
36-
$($1 > /dev/null)
36+
$($1 >/dev/null)
3737
if [ $? -eq 0 ]; then
3838
echo "running: $2"
39-
$($2 > /dev/null)
39+
$($2 >/dev/null)
4040
fi
4141
}
4242

4343
# Define max retries
44-
max_attempts=3;
45-
attempt_num=1;
44+
max_attempts=3
45+
attempt_num=1
4646

4747
arg1="$1"
4848
arg2="$2"
4949

50-
if [ $# -eq 1 ]
51-
then
50+
if [ $# -eq 1 ]; then
5251
cmd="$arg1"
5352
else
5453
cmd="runIfSuccessful \"$arg1\" \"$arg2\""
5554
fi
5655

57-
until eval $cmd
58-
do
59-
if ((attempt_num==max_attempts))
60-
then
61-
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
62-
exit
63-
else
64-
echo "Attempt $attempt_num / $max_attempts failed!"
65-
sleep $((attempt_num++))
66-
fi
56+
until eval $cmd; do
57+
if ((attempt_num == max_attempts)); then
58+
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
59+
exit 1
60+
else
61+
echo "Attempt $attempt_num / $max_attempts failed!"
62+
sleep $((attempt_num++))
63+
fi
6764
done

run/markdown-preview/editor/test/system.test.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ describe('End-to-End Tests', () => {
4040
`gcloud builds submit --project ${GOOGLE_CLOUD_PROJECT} ` +
4141
'--config ../renderer/test/e2e_test_setup.yaml ' +
4242
`--substitutions _SERVICE=renderer-${SERVICE_NAME},_REGION=${REGION}`;
43+
4344
if (SAMPLE_VERSION) buildRendererCmd += `,_VERSION=${SAMPLE_VERSION}`;
44-
if (SERVICE_ACCOUNT) buildRendererCmd += `,_SERVICE_ACCOUNT=${SERVICE_ACCOUNT}`;
45+
if (SERVICE_ACCOUNT) {
46+
buildRendererCmd += `,_SERVICE_ACCOUNT=${SERVICE_ACCOUNT}`;
47+
}
4548

4649
console.log('Starting Cloud Build for Renderer service...');
4750
execSync(buildRendererCmd, {cwd: '../renderer'});

run/markdown-preview/renderer/test/retry.sh

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,32 @@
3333
# If first cmd executes successfully then execute second cmd
3434
runIfSuccessful() {
3535
echo "running: $1"
36-
$($1 > /dev/null)
36+
$($1 >/dev/null)
3737
if [ $? -eq 0 ]; then
3838
echo "running: $2"
39-
$($2 > /dev/null)
39+
$($2 >/dev/null)
4040
fi
4141
}
4242

4343
# Define max retries
44-
max_attempts=3;
45-
attempt_num=1;
44+
max_attempts=3
45+
attempt_num=1
4646

4747
arg1="$1"
4848
arg2="$2"
4949

50-
if [ $# -eq 1 ]
51-
then
50+
if [ $# -eq 1 ]; then
5251
cmd="$arg1"
5352
else
5453
cmd="runIfSuccessful \"$arg1\" \"$arg2\""
5554
fi
5655

57-
until eval $cmd
58-
do
59-
if ((attempt_num==max_attempts))
60-
then
61-
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
62-
exit
63-
else
64-
echo "Attempt $attempt_num / $max_attempts failed!"
65-
sleep $((attempt_num++))
66-
fi
56+
until eval $cmd; do
57+
if ((attempt_num == max_attempts)); then
58+
echo "Attempt $attempt_num / $max_attempts failed! No more retries left!"
59+
exit 1
60+
else
61+
echo "Attempt $attempt_num / $max_attempts failed!"
62+
sleep $((attempt_num++))
63+
fi
6764
done

run/markdown-preview/renderer/test/system.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ describe('End-to-End Tests', () => {
3333
const {SERVICE_ACCOUNT} = process.env;
3434
const REGION = 'us-central1';
3535

36-
3736
let BASE_URL;
3837
before(async () => {
3938
// Deploy service using Cloud Build
@@ -55,7 +54,6 @@ describe('End-to-End Tests', () => {
5554
);
5655
BASE_URL = url.toString('utf-8').trim();
5756
if (!BASE_URL) throw Error('Cloud Run service URL not found');
58-
5957
});
6058

6159
after(() => {

0 commit comments

Comments
 (0)