Skip to content

Commit 125e563

Browse files
nnegreyAhrar Monsur
authored andcommitted
docs: fix failing video tests and remove invalid file (#421)
1 parent 3bc0f05 commit 125e563

9 files changed

+12
-12
lines changed

video-intelligence/analyze.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,14 +594,14 @@ async function main() {
594594
)
595595
.example(`node $0 shots gs://cloud-samples-data/video/googlework_short.mp4`)
596596
.example(`node $0 labels-gcs gs://cloud-samples-data/video/cat.mp4`)
597-
.example(`node $0 labels-file cat.mp4`)
598-
.example(`node $0 safe-search gs://cloud-samples-data/video/cat.mp4`)
597+
.example(`node $0 labels-file googlework_short.mp4`)
598+
.example(`node $0 safe-search gs://cloud-samples-data/video/googlework_short.mp4`)
599599
.example(`node $0 transcription gs://cloud-samples-data/video/cat.mp4`)
600600
.example(`node $0 video-text ./resources/googlework_short.mp4`)
601601
.example(
602602
`node $0 video-text-gcs gs://nodejs-docs-samples/video/googlework_short.mp4`
603603
)
604-
.example(`node $0 track-objects ./resources/cat.mp4`)
604+
.example(`node $0 track-objects ./resources/googlework_short.mp4`)
605605
.example(`node $0 track-objects-gcs gs://nodejs-docs-samples/video/cat.mp4`)
606606
.wrap(120)
607607
.recommendCommands()

video-intelligence/system-test/analyze-streaming-annotation-to-storage.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2121

2222
const cmd = `node analyze-streaming-annotation-to-storage.js`;
2323
const project = process.env.GCLOUD_PROJECT;
24-
const file = 'resources/cat.mp4';
24+
const file = 'resources/googlework_short.mp4';
2525
const outputUri = 'gs://' + project + '/VIDEO_STREAMING_OUTPUT';
2626

2727
describe('streaming annotation to storage', () => {

video-intelligence/system-test/analyze-streaming-automl-classification.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2323
const cmd = `node analyze-streaming-automl-classification.js`;
2424
const modelId = `VCN3094808572840640512`;
2525
const project = process.env.GCLOUD_PROJECT;
26-
const file = 'resources/cat.mp4';
26+
const file = 'resources/googlework_short.mp4';
2727

2828
describe('streaming automl classification', () => {
2929
it('should classify the action in the streaming video', async () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const {describe, it} = require('mocha');
2121
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2222

2323
const cmd = `node analyze-streaming-labels.js`;
24-
const file = 'resources/cat.mp4';
24+
const file = 'resources/googlework_short.mp4';
2525

2626
describe('streaming label', () => {
2727
it('should analyze labels in a streaming video', async () => {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const {describe, it} = require('mocha');
2121
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2222

2323
const cmd = `node analyze-streaming-object.js`;
24-
const file = 'resources/cat.mp4';
24+
const file = 'resources/googlework_short.mp4';
2525

2626
describe('streaming object', () => {
2727
it('should track an object in a streaming video', async () => {

video-intelligence/system-test/analyze-streaming-safe-search.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const {describe, it} = require('mocha');
2020
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2121

2222
const cmd = `node analyze-streaming-safe-search.js`;
23-
const file = 'resources/cat.mp4';
23+
const file = 'resources/googlework_short.mp4';
2424

2525
describe('streaming safe search', () => {
2626
it('should analyze explicit content in a streaming video', async () => {

video-intelligence/system-test/analyze-streaming-shot-change.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const {describe, it} = require('mocha');
2121
const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2222

2323
const cmd = `node analyze-streaming-shot-change.js`;
24-
const file = 'resources/cat.mp4';
24+
const file = 'resources/googlework_short.mp4';
2525

2626
describe('streaming shot change', () => {
2727
it('should analyze shot changes in a streaming video', async () => {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2424

2525
const cmd = 'node analyze.js';
2626
const catUrl = 'gs://cloud-samples-data/video/cat.mp4';
27-
const file = 'resources/cat.mp4';
27+
const file = 'resources/googlework_short.mp4';
2828
const file2 = 'resources/googlework_short.mp4';
2929
const possibleTexts = /Google|GOOGLE|SUR|OMAR|ROTO|Vice President|58oo9|LONDRES|PARIS|METRO|RUE|CARLO/;
3030

3131
describe('analyze samples', () => {
3232
// analyze_labels_local
3333
it('should analyze labels in a local file', async () => {
3434
const output = execSync(`${cmd} labels-file ${file}`);
35-
assert.match(output, /Label whiskers occurs at:/);
35+
assert.match(output, /Label/);
3636
assert.match(output, /Confidence: \d+\.\d+/);
3737
});
3838

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'});
2424

2525
const cmd = 'node analyze.v1p2beta1.js';
2626
const url = 'gs://cloud-samples-data/video/cat.mp4';
27-
const file1 = 'resources/cat.mp4';
27+
const file1 = 'resources/googlework_short.mp4';
2828
const file2 = 'resources/googlework_short.mp4';
2929
const possibleTexts = /Google|GOOGLE|SUR|OMAR|ROTO|Vice President|58oo9|LONDRES|PARIS|METRO|RUE|CARLO/;
3030

0 commit comments

Comments
 (0)