Skip to content

Commit a17c115

Browse files
telpirionAce Nassri
authored andcommitted
test: changes AutoML v1beta1 model for v1 model (#676)
* test: changes AutoML v1beta1 model for v1 model * test: changed asserts
1 parent 4220a75 commit a17c115

4 files changed

+10
-10
lines changed

translate/test/v3/translate_batch_translate_text_with_glossary_and_model.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ async function clearBucket(projectId, storage, bucketUuid) {
4343
describe(REGION_TAG, () => {
4444
const translationClient = new TranslationServiceClient();
4545
const location = 'us-central1';
46-
const modelId = 'TRL1218052175389786112';
46+
const modelId = 'TRL8567014172607381504';
4747
const bucketUuid = uuid.v4();
4848
const bucketName = `translation-${bucketUuid}/BATCH_TRANSLATE_GLOSS_MODEL_OUTPUT/`;
4949
const storage = new Storage();
@@ -76,8 +76,8 @@ describe(REGION_TAG, () => {
7676
const output = execSync(
7777
`node v3/${REGION_TAG}.js ${projectId} ${location} ${inputUri} ${outputUri} ${GLOSSARY_ID} ${modelId}`
7878
);
79-
assert.match(output, /Total Characters: 25/);
80-
assert.match(output, /Translated Characters: 25/);
79+
assert.match(output, /Total Characters/);
80+
assert.match(output, /Translated Characters/);
8181

8282
// batch translate fluctuates between 2 to 4 minutes.
8383
this.timeout(300000);

translate/test/v3/translate_batch_translate_text_with_model.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ async function clearBucket(projectId, storage, bucketUuid) {
4242
describe(REGION_TAG, () => {
4343
const translationClient = new TranslationServiceClient();
4444
const location = 'us-central1';
45-
const modelId = 'TRL1218052175389786112';
45+
const modelId = 'TRL8567014172607381504';
4646
const bucketUuid = uuid.v4();
4747
const bucketName = `translation-${bucketUuid}/BATCH_TRANSLATE_WITH_MODEL_OUTPUT/`;
4848
const storage = new Storage();
@@ -75,8 +75,8 @@ describe(REGION_TAG, () => {
7575
const output = execSync(
7676
`node v3/${REGION_TAG}.js ${projectId} ${location} ${inputUri} ${outputUri} ${modelId}`
7777
);
78-
assert.match(output, /Total Characters: 15/);
79-
assert.match(output, /Translated Characters: 15/);
78+
assert.match(output, /Total Characters/);
79+
assert.match(output, /Translated Characters/);
8080
});
8181

8282
// Delete the folder from GCS for cleanup

translate/test/v3/translate_translate_text_with_glossary_and_model.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ const REGION_TAG = 'translate_translate_text_with_glossary_and_model';
2727
describe(REGION_TAG, () => {
2828
const translationClient = new TranslationServiceClient();
2929
const location = 'us-central1';
30-
const modelId = 'TRL1218052175389786112';
30+
const modelId = 'TRL8567014172607381504';
3131

3232
it('should translate text with a glossary and Automl model in project', async () => {
3333
const projectId = await translationClient.getProjectId();
3434
const input = 'directions';
3535
const output = execSync(
3636
`node v3/${REGION_TAG}.js ${projectId} ${location} ${GLOSSARY_ID} ${modelId} ${input}`
3737
);
38-
assert.match(output, //);
38+
assert.match(output, /Translation/);
3939
});
4040
});

translate/test/v3/translate_translate_text_with_model.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ const REGION_TAG = 'translate_translate_text_with_model';
2525
describe(REGION_TAG, () => {
2626
const translationClient = new TranslationServiceClient();
2727
const location = 'us-central1';
28-
const modelId = 'TRL1218052175389786112';
28+
const modelId = 'TRL8567014172607381504';
2929
const input = 'Tell me how this ends';
3030

3131
it('should translate text with an automl model in project', async () => {
3232
const projectId = await translationClient.getProjectId();
3333
const output = await execSync(
3434
`node v3/${REGION_TAG}.js ${projectId} ${location} ${modelId} ${input}`
3535
);
36-
assert.match(output, /Translated Content: /);
36+
assert.match(output, /Translated Content:/);
3737
});
3838
});

0 commit comments

Comments
 (0)