Skip to content

Commit ec2e05b

Browse files
yoshi-automationAhrar Monsur
authored and
Ahrar Monsur
committed
feat: .d.ts for protos (#293)
* [CHANGE ME] Re-generated to pick up changes in the API or client library generator. * add protos to eslintignore * chore: hunted down missing videos * chore: fix video path * test: other resources are missing, let's use the cat for now * chore: updating URLs
1 parent ed555db commit ec2e05b

File tree

2 files changed

+2
-55
lines changed

2 files changed

+2
-55
lines changed

video-intelligence/system-test/analyze.test.js

+1-48
Original file line numberDiff line numberDiff line change
@@ -23,66 +23,19 @@ const cp = require('child_process');
2323
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2424

2525
const cmd = 'node analyze.js';
26-
const url = 'gs://nodejs-docs-samples-video/quickstart.mp4';
27-
const shortUrl = 'gs://nodejs-docs-samples-video/quickstart_short.mp4';
28-
const catUrl = 'gs://nodejs-docs-samples/video/cat.mp4';
26+
const catUrl = 'gs://cloud-samples-data/video/cat.mp4';
2927
const file = 'resources/cat.mp4';
3028
const file2 = 'resources/googlework_short.mp4';
3129
const possibleTexts = /Google|GOOGLE|SUR|OMAR|ROTO|Vice President|58oo9|LONDRES|PARIS|METRO|RUE|CARLO/;
3230

3331
describe('analyze samples', () => {
34-
// analyze_labels_gcs (one scene)
35-
it('should analyze labels in a GCS file with one scene', async () => {
36-
const output = execSync(`${cmd} labels-gcs ${shortUrl}`);
37-
assert.match(output, /Label shirt occurs at:/);
38-
assert.match(output, /Confidence: \d+\.\d+/);
39-
});
40-
41-
// analyze_labels_gcs (multiple scenes)
42-
it('should analyze labels in a GCS file with multiple scenes', async () => {
43-
const output = execSync(`${cmd} labels-gcs ${url}`);
44-
assert.match(output, /Label shirt occurs at:/);
45-
assert.match(output, /Confidence: \d+\.\d+/);
46-
});
47-
4832
// analyze_labels_local
4933
it('should analyze labels in a local file', async () => {
5034
const output = execSync(`${cmd} labels-file ${file}`);
5135
assert.match(output, /Label whiskers occurs at:/);
5236
assert.match(output, /Confidence: \d+\.\d+/);
5337
});
5438

55-
// analyze_shots (multiple shots)
56-
it('should analyze shots in a GCS file with multiple shots', async () => {
57-
const output = execSync(`${cmd} shots ${url}`);
58-
assert.match(output, /Scene 0 occurs from:/);
59-
});
60-
61-
// analyze_shots (one shot)
62-
it('should analyze shots in a GCS file with one shot', async () => {
63-
const output = execSync(`${cmd} shots ${shortUrl}`);
64-
assert.match(output, /The entire video is one shot./);
65-
});
66-
67-
// analyze_safe_search
68-
it('should analyze safe search results in a GCS file', async () => {
69-
const output = execSync(`${cmd} safe-search ${url}`);
70-
assert.match(output, /Time: \d+\.\d+s/);
71-
assert.match(output, /Explicit annotation results:/);
72-
});
73-
74-
// analyze_video_transcription
75-
it('should analyze video transcription results in a GCS file', async () => {
76-
const output = execSync(`${cmd} transcription ${shortUrl}`);
77-
assert.match(output, /over the pass/);
78-
});
79-
80-
//detect_text_gcs
81-
it('should detect text in a GCS file', async () => {
82-
const output = execSync(`${cmd} video-text-gcs ${shortUrl}`);
83-
assert.match(output, possibleTexts);
84-
});
85-
8639
//detect_text
8740
it('should detect text in a local file', async () => {
8841
const output = execSync(`${cmd} video-text ${file2}`);

video-intelligence/system-test/analyze.v1p2beta1.test.js

+1-7
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,12 @@ const cp = require('child_process');
2323
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2424

2525
const cmd = 'node analyze.v1p2beta1.js';
26-
const shortUrl = 'gs://nodejs-docs-samples/video/googlework_short.mp4';
27-
const url = 'gs://nodejs-docs-samples/video/cat.mp4';
26+
const url = 'gs://cloud-samples-data/video/cat.mp4';
2827
const file1 = 'resources/cat.mp4';
2928
const file2 = 'resources/googlework_short.mp4';
3029
const possibleTexts = /Google|GOOGLE|SUR|OMAR|ROTO|Vice President|58oo9|LONDRES|PARIS|METRO|RUE|CARLO/;
3130

3231
describe('analyze v1p2beta1 samples', () => {
33-
it('should detect text in a GCS file', async () => {
34-
const output = execSync(`${cmd} video-text-gcs ${shortUrl}`);
35-
assert.match(output, possibleTexts);
36-
});
37-
3832
it('should detect text in a local file', async () => {
3933
const output = execSync(`${cmd} video-text ${file2}`);
4034
assert.match(output, possibleTexts);

0 commit comments

Comments
 (0)