From 40ae0dbef575d24197cae37914327fd0330e0a77 Mon Sep 17 00:00:00 2001 From: e19166 Date: Wed, 14 Aug 2024 11:54:29 +0530 Subject: [PATCH] commit tests with mentioned error --- ballerina/Ballerina.toml | 2 +- ballerina/Dependencies.toml | 28 +++++----------------------- ballerina/tests/tests.bal | 11 +++++------ 3 files changed, 11 insertions(+), 30 deletions(-) diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index a261f62..6b1cd3a 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -1,5 +1,5 @@ [package] -distribution = "2201.9.2" +distribution = "2201.9.3" org = "ballerinax" name = "openai.audio" version = "1.0.5" diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml index 5a8ba94..05d1309 100644 --- a/ballerina/Dependencies.toml +++ b/ballerina/Dependencies.toml @@ -5,12 +5,12 @@ [ballerina] dependencies-toml-version = "2" -distribution-version = "2201.9.2" +distribution-version = "2201.9.3" [[package]] org = "ballerina" name = "auth" -version = "2.11.1" +version = "2.11.2" dependencies = [ {org = "ballerina", name = "crypto"}, {org = "ballerina", name = "jballerina.java"}, @@ -96,14 +96,11 @@ modules = [ [[package]] org = "ballerina" name = "io" -version = "1.6.0" +version = "1.6.1" dependencies = [ {org = "ballerina", name = "jballerina.java"}, {org = "ballerina", name = "lang.value"} ] -modules = [ - {org = "ballerina", packageName = "io", moduleName = "io"} -] [[package]] org = "ballerina" @@ -315,20 +312,6 @@ modules = [ {org = "ballerinai", packageName = "observe", moduleName = "observe"} ] -[[package]] -org = "ballerinax" -name = "openai.audio" -version = "1.0.5" -dependencies = [ - {org = "ballerina", name = "http"}, - {org = "ballerina", name = "mime"}, - {org = "ballerina", name = "url"}, - {org = "ballerinai", name = "observe"} -] -modules = [ - {org = "ballerinax", packageName = "openai.audio", moduleName = "openai.audio"} -] - [[package]] org = "wishulaj" name = "Audio" @@ -336,13 +319,12 @@ version = "0.1.0" dependencies = [ {org = "ballerina", name = "constraint"}, {org = "ballerina", name = "http"}, - {org = "ballerina", name = "io"}, {org = "ballerina", name = "mime"}, {org = "ballerina", name = "test"}, {org = "ballerina", name = "url"}, - {org = "ballerinai", name = "observe"}, - {org = "ballerinax", name = "openai.audio"} + {org = "ballerinai", name = "observe"} ] modules = [ {org = "wishulaj", packageName = "Audio", moduleName = "Audio"} ] + diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal index e700cb3..cf62fd5 100644 --- a/ballerina/tests/tests.bal +++ b/ballerina/tests/tests.bal @@ -61,19 +61,18 @@ isolated function testCreateSpeech() returns error? { @test:Config { - enable:false + enable:false, + groups: ["live_tests", "mock_tests"] } isolated function testCreateTranscription() returns error? { CreateTranscriptionRequest payload = { file: {fileContent: content1, fileName: "./speech.mp3"}, - model: "whisper-1", - response_format: "verbose_json" - }; + model: "whisper-1" + }; map headers = { "Content-Type": mime:MULTIPART_FORM_DATA }; - CreateTranscriptionResponse result = check openAIAudio->/audio/transcriptions.post(payload, headers); - test:assertEquals(result.text, "The quick brown fox jumped over the lazy dog."); + test:assertEquals(result.text, "The"); }