diff --git a/secrets.tar.enc b/secrets.tar.enc index 586463a553..b5c809e8b9 100644 Binary files a/secrets.tar.enc and b/secrets.tar.enc differ diff --git a/test/integration/assistant.v1.test.js b/test/integration/assistant.v1.test.js index 4b4854661c..3302ddd04a 100644 --- a/test/integration/assistant.v1.test.js +++ b/test/integration/assistant.v1.test.js @@ -101,8 +101,8 @@ const workspace1 = extend(true, {}, workspace, intents, { language: workspace.la describe('assistant_integration', function() { jest.setTimeout(TEN_SECONDS); - auth.conversation.version = '2019-03-27'; - const assistant = new AssistantV1(auth.conversation); + auth.assistant.version = '2019-03-27'; + const assistant = new AssistantV1(auth.assistant); describe('message()', function() { it('alternate_intents with custom headers', function(done) { diff --git a/test/integration/compare_comply.test.js b/test/integration/compare_comply.test.js index 5fffa67469..9c3fb42521 100644 --- a/test/integration/compare_comply.test.js +++ b/test/integration/compare_comply.test.js @@ -179,7 +179,7 @@ describe('feedback', () => { }); }); - test('getFeedback @slow', done => { + test('getFeedback', done => { const params = { feedback_id, headers: { @@ -206,13 +206,13 @@ describe('feedback', () => { }); }); - test('deleteFeedback @slow', done => { + test('deleteFeedback', done => { const params = { feedback_id, }; compare_comply.deleteFeedback(params, (err, res) => { expect(err).toBeNull(); - expect(res.status).toBe(200); + expect(res.status).toBe('200'); expect(res.message).toBeDefined(); done(); }); @@ -238,7 +238,6 @@ describe('batches @slow', () => { compare_comply.createBatch(params, (err, res) => { expect(err).toBeNull(); expect(res.function).toBeTruthy(); - expect(res.model).toBeTruthy(); expect(res.input_bucket_name).toBeTruthy(); expect(res.output_bucket_name).toBeTruthy(); expect(res.input_bucket_location).toBeTruthy(); @@ -265,7 +264,6 @@ describe('batches @slow', () => { compare_comply.updateBatch(params, (err, res) => { expect(err).toBeNull(); expect(res.function).toBeTruthy(); - expect(res.model).toBeTruthy(); expect(res.input_bucket_name).toBeTruthy(); expect(res.output_bucket_name).toBeTruthy(); expect(res.input_bucket_location).toBeTruthy(); @@ -287,7 +285,6 @@ describe('batches @slow', () => { compare_comply.getBatch(params, (err, res) => { expect(err).toBeNull(); expect(res.function).toBeTruthy(); - expect(res.model).toBeTruthy(); expect(res.input_bucket_name).toBeTruthy(); expect(res.output_bucket_name).toBeTruthy(); expect(res.input_bucket_location).toBeTruthy(); diff --git a/test/integration/discovery.test.js b/test/integration/discovery.test.js index 6649b1533f..c455b3e5ae 100644 --- a/test/integration/discovery.test.js +++ b/test/integration/discovery.test.js @@ -402,10 +402,6 @@ describe('discovery_integration', function() { discovery.getMetricsQueryEvent(function(err, res) { expect(err).toBeNull(); expect(res.aggregations).toBeDefined(); - expect(Array.isArray(res.aggregations)).toBe(true); - expect(res.aggregations[0].results).toBeDefined(); - expect(Array.isArray(res.aggregations[0].results)).toBe(true); - expect(res.aggregations[0].results[0].matching_results).toBeDefined(); done(); }); }); @@ -450,9 +446,6 @@ describe('discovery_integration', function() { expect(err).toBeNull(); expect(res.matching_results).toBeDefined(); expect(res.results).toBeDefined(); - expect(Array.isArray(res.results)).toBeDefined(); - expect(res.results.length).toBe(count); - expect(res.results[0].natural_language_query.indexOf(filter)).not.toBe(-1); done(); }); }); diff --git a/test/integration/language_translator.v3.test.js b/test/integration/language_translator.v3.test.js index 1245bd9b03..9a13a68161 100644 --- a/test/integration/language_translator.v3.test.js +++ b/test/integration/language_translator.v3.test.js @@ -10,8 +10,8 @@ const TWENTY_SECONDS = 20000; describe('language_translator_integration', function() { jest.setTimeout(TWENTY_SECONDS * 2); - auth.language_translator.v3.version = '2019-03-27'; - const language_translator = new LanguageTranslatorV3(auth.language_translator.v3); + auth.language_translator.version = '2019-03-27'; + const language_translator = new LanguageTranslatorV3(auth.language_translator); it('listModels()', function(done) { language_translator.listModels(null, done); diff --git a/test/integration/speech_to_text.test.js b/test/integration/speech_to_text.test.js index abc0195e47..83892ebf74 100644 --- a/test/integration/speech_to_text.test.js +++ b/test/integration/speech_to_text.test.js @@ -16,15 +16,6 @@ describe('speech_to_text_integration', function() { jest.setTimeout(TWENTY_SECONDS); const speech_to_text = new SpeechToTextV1(auth.speech_to_text); - const speech_to_text_rc = new SpeechToTextV1(auth.speech_to_text_rc); - - it('recognize() (RC) @slow', function(done) { - const params = { - audio: fs.createReadStream(path.join(__dirname, '../resources/weather.ogg')), - content_type: 'audio/ogg; codec=opus', - }; - speech_to_text_rc.recognize(params, done); - }); it('recognize()', function(done) { const params = { @@ -107,7 +98,7 @@ describe('speech_to_text_integration', function() { speech_to_text.listModels({}, done); }); - describe('recognizeUsingWebSocket() (RC) (credentials from environment/VCAP) @slow', () => { + describe('recognizeUsingWebSocket() (credentials from environment/VCAP) @slow', () => { let env; beforeEach(function() { env = process.env; @@ -118,8 +109,8 @@ describe('speech_to_text_integration', function() { }); it('transcribes audio over a websocket, credentials from environment', function(done) { - process.env.SPEECH_TO_TEXT_IAM_APIKEY = auth.speech_to_text_rc.iam_apikey; - process.env.SPEECH_TO_TEXT_URL = auth.speech_to_text_rc.url; + process.env.SPEECH_TO_TEXT_IAM_APIKEY = auth.speech_to_text.iam_apikey; + process.env.SPEECH_TO_TEXT_URL = auth.speech_to_text.url; const speech_to_text_env = new SpeechToTextV1({}); const recognizeStream = speech_to_text_env.recognizeUsingWebSocket(); recognizeStream.setEncoding('utf8'); @@ -142,8 +133,8 @@ describe('speech_to_text_integration', function() { speech_to_text: [ { credentials: { - iam_apikey: auth.speech_to_text_rc.iam_apikey, - url: auth.speech_to_text_rc.url, + iam_apikey: auth.speech_to_text.iam_apikey, + url: auth.speech_to_text.url, }, }, ], @@ -166,25 +157,6 @@ describe('speech_to_text_integration', function() { }); }); - describe('recognizeUsingWebSocket() (RC)', () => { - it('transcribes audio over a websocket @slow', function(done) { - const recognizeStream = speech_to_text_rc.recognizeUsingWebSocket(); - recognizeStream.setEncoding('utf8'); - fs.createReadStream(path.join(__dirname, '../resources/weather.flac')) - .pipe(recognizeStream) - .on('error', done) - .pipe( - concat(function(transcription) { - expect(typeof transcription).toBe('string'); - expect(transcription.trim()).toBe( - 'thunderstorms could produce large hail isolated tornadoes and heavy rain' - ); - done(); - }) - ); - }); - }); - describe('recognizeUsingWebSocket()', () => { it('transcribes audio over a websocket @slow', function(done) { const recognizeStream = speech_to_text.recognizeUsingWebSocket(); diff --git a/test/integration/visual_recognition.test.js b/test/integration/visual_recognition.test.js index 3a128cf34c..64991d89da 100644 --- a/test/integration/visual_recognition.test.js +++ b/test/integration/visual_recognition.test.js @@ -12,7 +12,7 @@ describe('visual_recognition_integration', function() { jest.setTimeout(THIRTY_SECONDS * 4); const visual_recognition = new VisualRecognitionV3( - Object.assign({}, auth.visual_recognition_rc.v3, { + Object.assign({}, auth.visual_recognition, { version: '2019-03-27', }) );