Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(run/system-package): onboard to new testing #3992

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 0 additions & 1 deletion .github/config/nodejs-prod.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@
"recaptcha_enterprise/snippets", // Cannot use import statement outside a module
"run/idp-sql", // Error: Invalid contents in the credentials file
"run/markdown-preview/editor", // Error: could not create an identity token: Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file
"run/system-package", // Error: ENOENT: no such file or directory, access '/usr/bin/dot'
"scheduler", // SyntaxError: Cannot use import statement outside a module
"speech", // AssertionError: expected 'Transcription: Okay, I\'m here.\n Hi…' to match /Terrific. It's on the way./
"storagetransfer", // CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1
Expand Down
2 changes: 1 addition & 1 deletion run/system-package/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ FROM node:20-alpine
WORKDIR /usr/src/app

# [START cloudrun_system_package_alpine]
RUN apk --no-cache add graphviz ttf-ubuntu-font-family
RUN apk --no-cache add graphviz
# [END cloudrun_system_package_alpine]

# Copy application dependency manifests to the container image.
Expand Down
7 changes: 4 additions & 3 deletions run/system-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
"private": true,
"scripts": {
"start": "node index.js",
"test": "c8 mocha -p -j 2 test/app.test.js --check-leaks",
"system-test": "echo 'SKIPPING E2E TEST: SEE b/358734748'",
"FIXME-system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit"
"test": "npm -- run all-test",
"all-test": "npm run unit-test && npm run system-test",
"unit-test": "c8 mocha -p -j 2 test/app.test.js --check-leaks",
"system-test": "c8 mocha -p -j 2 test/system.test.js --timeout=360000 --exit"
},
"engines": {
"node": ">=18.0.0"
Expand Down
4 changes: 4 additions & 0 deletions run/system-package/test/app.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@

'use strict';

const {execSync} = require('child_process');
const path = require('path');
const supertest = require('supertest');

// Manually install system package in testing environment
execSync('sudo apt install graphviz -y');

describe('Unit Tests', () => {
const app = require(path.join(__dirname, '..', 'app'));
const request = supertest(app);
Expand Down
Loading