Skip to content

Commit a81f9f1

Browse files
b-loved-dreamerAce Nassri
authored and
Ace Nassri
committed
chore: solves resource id issues (#743)
1 parent 1d333e5 commit a81f9f1

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

speech/system-test/modelAdaptation.test.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,20 @@ const text = 'how old is the Brooklyn Bridge';
2828
const adaptationClient = new speech.AdaptationClient();
2929

3030
const projectId = process.env.GCLOUD_PROJECT;
31-
const location = 'us-west1'
32-
const customClassId = uuidv4().replace(/-/g, '').substring(0, 15);
33-
const phraseSetId = uuidv4().replace(/-/g, '').substring(0, 15);
31+
const location = 'global'
32+
const customClassId = `customClassId${uuidv4().replace(/-/g, '').substring(0, 8)}`;
33+
const phraseSetId = `phraseSetId${uuidv4().replace(/-/g, '').substring(0, 8)}`;
3434
const classParent = `projects/${projectId}/locations/${location}/customClasses/${customClassId}`;
35-
const phraseParent = `projects/${projectId}/locations/${location}/phraseSets/${customClassId}`;
35+
const phraseParent = `projects/${projectId}/locations/${location}/phraseSets/${phraseSetId}`;
3636

3737
describe('modelAdaptation', () => {
38-
// TODO: investigate why this test fails when us-west1 used as location.
39-
// when set to global, it fails with 404.
40-
it.skip('should run modelAdaptation', async () => {
38+
it('should run modelAdaptation', async () => {
4139
const stdout = execSync(`node modelAdaptation.js ${projectId} ${location} ${storageUri} ${customClassId} ${phraseSetId}`)
4240
assert.match(stdout, /Transcription:/ );
4341
});
4442
after(async () => {
4543
// Release used resources
46-
// TODO: investigate why this test fails when us-west1 used as location.
47-
// when set to global, it fails with 404.
48-
// await cleanUp(classParent, phraseParent);
44+
await cleanUp(classParent, phraseParent);
4945
})
5046
});
5147

0 commit comments

Comments
 (0)