From aeee2859f64c18841478c6797c32d71df84614d7 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Mon, 30 Sep 2019 14:40:48 -0700 Subject: [PATCH] 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 --- .../system-test/analyze.test.js | 49 +------------------ .../system-test/analyze.v1p2beta1.test.js | 8 +-- 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/video-intelligence/system-test/analyze.test.js b/video-intelligence/system-test/analyze.test.js index 6bf34cf640..0cb943cd52 100644 --- a/video-intelligence/system-test/analyze.test.js +++ b/video-intelligence/system-test/analyze.test.js @@ -23,28 +23,12 @@ const cp = require('child_process'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node analyze.js'; -const url = 'gs://nodejs-docs-samples-video/quickstart.mp4'; -const shortUrl = 'gs://nodejs-docs-samples-video/quickstart_short.mp4'; -const catUrl = 'gs://nodejs-docs-samples/video/cat.mp4'; +const catUrl = 'gs://cloud-samples-data/video/cat.mp4'; const file = 'resources/cat.mp4'; const file2 = 'resources/googlework_short.mp4'; const possibleTexts = /Google|GOOGLE|SUR|OMAR|ROTO|Vice President|58oo9|LONDRES|PARIS|METRO|RUE|CARLO/; describe('analyze samples', () => { - // analyze_labels_gcs (one scene) - it('should analyze labels in a GCS file with one scene', async () => { - const output = execSync(`${cmd} labels-gcs ${shortUrl}`); - assert.match(output, /Label shirt occurs at:/); - assert.match(output, /Confidence: \d+\.\d+/); - }); - - // analyze_labels_gcs (multiple scenes) - it('should analyze labels in a GCS file with multiple scenes', async () => { - const output = execSync(`${cmd} labels-gcs ${url}`); - assert.match(output, /Label shirt occurs at:/); - assert.match(output, /Confidence: \d+\.\d+/); - }); - // analyze_labels_local it('should analyze labels in a local file', async () => { const output = execSync(`${cmd} labels-file ${file}`); @@ -52,37 +36,6 @@ describe('analyze samples', () => { assert.match(output, /Confidence: \d+\.\d+/); }); - // analyze_shots (multiple shots) - it('should analyze shots in a GCS file with multiple shots', async () => { - const output = execSync(`${cmd} shots ${url}`); - assert.match(output, /Scene 0 occurs from:/); - }); - - // analyze_shots (one shot) - it('should analyze shots in a GCS file with one shot', async () => { - const output = execSync(`${cmd} shots ${shortUrl}`); - assert.match(output, /The entire video is one shot./); - }); - - // analyze_safe_search - it('should analyze safe search results in a GCS file', async () => { - const output = execSync(`${cmd} safe-search ${url}`); - assert.match(output, /Time: \d+\.\d+s/); - assert.match(output, /Explicit annotation results:/); - }); - - // analyze_video_transcription - it('should analyze video transcription results in a GCS file', async () => { - const output = execSync(`${cmd} transcription ${shortUrl}`); - assert.match(output, /over the pass/); - }); - - //detect_text_gcs - it('should detect text in a GCS file', async () => { - const output = execSync(`${cmd} video-text-gcs ${shortUrl}`); - assert.match(output, possibleTexts); - }); - //detect_text it('should detect text in a local file', async () => { const output = execSync(`${cmd} video-text ${file2}`); diff --git a/video-intelligence/system-test/analyze.v1p2beta1.test.js b/video-intelligence/system-test/analyze.v1p2beta1.test.js index 3982a0e529..aa08b029c1 100644 --- a/video-intelligence/system-test/analyze.v1p2beta1.test.js +++ b/video-intelligence/system-test/analyze.v1p2beta1.test.js @@ -23,18 +23,12 @@ const cp = require('child_process'); const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); const cmd = 'node analyze.v1p2beta1.js'; -const shortUrl = 'gs://nodejs-docs-samples/video/googlework_short.mp4'; -const url = 'gs://nodejs-docs-samples/video/cat.mp4'; +const url = 'gs://cloud-samples-data/video/cat.mp4'; const file1 = 'resources/cat.mp4'; const file2 = 'resources/googlework_short.mp4'; const possibleTexts = /Google|GOOGLE|SUR|OMAR|ROTO|Vice President|58oo9|LONDRES|PARIS|METRO|RUE|CARLO/; describe('analyze v1p2beta1 samples', () => { - it('should detect text in a GCS file', async () => { - const output = execSync(`${cmd} video-text-gcs ${shortUrl}`); - assert.match(output, possibleTexts); - }); - it('should detect text in a local file', async () => { const output = execSync(`${cmd} video-text ${file2}`); assert.match(output, possibleTexts);