diff --git a/ballerina/tests/test.bal b/ballerina/tests/test.bal index a73ae18..ea57c6f 100644 --- a/ballerina/tests/test.bal +++ b/ballerina/tests/test.bal @@ -22,7 +22,7 @@ import ballerina/os; // Configurable variables for environment setup. configurable boolean isLiveServer = os:getEnv("isLiveServer") == "true"; -configurable string token = ?; +configurable string token = isLiveServer ? os:getEnv("OPENAI_API_KEY") : "test"; configurable string serviceUrl = isLiveServer ? "https://api.openai.com/v1" : "http://localhost:9090"; configurable string apiKey = isLiveServer ? token : "";