Skip to content

Commit 9a37b21

Browse files
authored
chore(cleanup): retire media translate samples (#3325)
add README with the deprecation message. skip the tests.
1 parent 577143e commit 9a37b21

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

mediatranslation/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Media Translation API deprication
2+
3+
Media Translation API is [deprecated] and will no longer be available on Google Cloud after July 1, 2024.
4+
All API code samples under this folder are no longer maintained and will be removed after July 1, 2024.
5+
6+
[deprecated]: https://cloud.google.com/translate/media/docs/deprecations

mediatranslation/test/quickstart.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const cmd = 'node quickstart.js';
2323
const filePath = path.join(__dirname, '..', 'resources/audio.raw');
2424
const exec = cmd => execSync(cmd, {encoding: 'utf-8'});
2525

26+
// skip this test because testing code sample is deprecated
2627
describe('Quickstart', () => {
27-
it('should translate from a streamed file', async () => {
28+
it.skip('should translate from a streamed file', async () => {
2829
const stdout = exec(`${cmd} ${filePath} linear16 en-US es-ES`);
2930
assert.include(stdout, 'Partial translation');
3031
});

mediatranslation/test/translate_from_file.test.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ const cmd = 'node translate_from_file.js';
2323
const filePath = path.join(__dirname, '..', 'resources/audio.raw');
2424
const exec = cmd => execSync(cmd, {encoding: 'utf-8'});
2525

26+
// skip this test because testing code sample is deprecated
2627
describe('MediaTranslation', () => {
27-
it('should translate from a streamed file', async () => {
28+
it.skip('should translate from a streamed file', async () => {
2829
const stdout = exec(`${cmd} ${filePath} linear16 en-US es-ES`);
2930
assert.include(stdout, 'Partial translation');
3031
});

0 commit comments

Comments
 (0)