Skip to content

Commit

Permalink
Add "live_tests", "mock_tests" groups in test.bal
Browse files Browse the repository at this point in the history
  • Loading branch information
KATTA-00 committed Aug 13, 2024
1 parent 50f3c82 commit 3c48274
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions ballerina/tests/test.bal
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function dataGen() returns TestData[][] {

@test:Config {
dataProvider: dataGen,
groups: ["Models"]
groups: ["Models", "live_tests", "mock_tests"]
}
isolated function testListModels(TestData testData) returns error? {
ListModelsResponse modelsResponse = check openAIFinetunes->/models.get();
Expand All @@ -63,7 +63,7 @@ isolated function testListModels(TestData testData) returns error? {
@test:Config {
dataProvider: dataGen,
dependsOn: [testListModels],
groups: ["Models"]
groups: ["Models", "live_tests", "mock_tests"]
}
isolated function testRetrieveModel(TestData testData) returns error? {
string modelId = testData.modelId;
Expand All @@ -76,7 +76,7 @@ isolated function testRetrieveModel(TestData testData) returns error? {
dependsOn: [testCreateFineTuningJob, testListModels, testRetrieveModel, testListFineTuningJobCheckpoints, testListFineTuningEvents],
dataProvider: dataGen,
enable: isLiveServer ? false : true, // Enable this test only for mock server.
groups: ["Models"]
groups: ["Models", "mock_tests"]
}
isolated function testDeleteModel(TestData testData) returns error? {
string modelIdCreated = testData.modelId;
Expand All @@ -86,7 +86,7 @@ isolated function testDeleteModel(TestData testData) returns error? {
}

@test:Config {
groups: ["Files"]
groups: ["Files", "live_tests", "mock_tests"]
}
isolated function testListFiles() returns error? {
ListFilesResponse filesResponse = check openAIFinetunes->/files.get();
Expand All @@ -97,7 +97,7 @@ isolated function testListFiles() returns error? {
@test:Config {
dependsOn: [testListFiles],
dataProvider: dataGen,
groups: ["Files"]
groups: ["Files", "live_tests", "mock_tests"]
}
isolated function testCreateFile(TestData testData) returns error? {
CreateFileRequest fileRequest = {
Expand All @@ -114,7 +114,7 @@ isolated function testCreateFile(TestData testData) returns error? {
@test:Config {
dependsOn: [testCreateFile],
dataProvider: dataGen,
groups: ["Files"]
groups: ["Files", "live_tests", "mock_tests"]
}
isolated function testRetrieveFile(TestData testData) returns error? {
string fileId = testData.fileId;
Expand All @@ -126,7 +126,7 @@ isolated function testRetrieveFile(TestData testData) returns error? {
@test:Config {
dependsOn: [testCreateFile],
dataProvider: dataGen,
groups: ["Files"]
groups: ["Files", "live_tests", "mock_tests"]
}
isolated function testDownloadFile(TestData testData) returns error? {
string fileId = testData.fileId;
Expand All @@ -137,7 +137,7 @@ isolated function testDownloadFile(TestData testData) returns error? {
@test:Config {
dependsOn: [testCreateFile, testRetrieveFile, testDownloadFile, testCreateFineTuningJob],
dataProvider: dataGen,
groups: ["Files"]
groups: ["Files", "live_tests", "mock_tests"]
}
isolated function testDeleteFile(TestData testData) returns error? {
string fileId = testData.fileId;
Expand All @@ -147,7 +147,7 @@ isolated function testDeleteFile(TestData testData) returns error? {
}

@test:Config {
groups: ["Fine-tuning"]
groups: ["Fine-tuning", "live_tests", "mock_tests"]
}
isolated function testListPaginatedFineTuningJobs() returns error? {
ListPaginatedFineTuningJobsResponse jobsResponse = check openAIFinetunes->/fine_tuning/jobs.get();
Expand All @@ -158,7 +158,7 @@ isolated function testListPaginatedFineTuningJobs() returns error? {
@test:Config {
dependsOn: [testListModels, testCreateFile],
dataProvider: dataGen,
groups: ["Fine-tuning"]
groups: ["Fine-tuning", "live_tests", "mock_tests"]
}
isolated function testCreateFineTuningJob(TestData testData) returns error? {
string fileId = testData.fileId;
Expand All @@ -178,7 +178,7 @@ isolated function testCreateFineTuningJob(TestData testData) returns error? {
@test:Config {
dependsOn: [testCreateFineTuningJob],
dataProvider: dataGen,
groups: ["Fine-tuning"]
groups: ["Fine-tuning", "live_tests", "mock_tests"]
}
isolated function testRetrieveFineTuningJob(TestData testData) returns error? {
string jobId = testData.jobId;
Expand All @@ -190,7 +190,7 @@ isolated function testRetrieveFineTuningJob(TestData testData) returns error? {
@test:Config {
dependsOn: [testCreateFineTuningJob],
dataProvider: dataGen,
groups: ["Fine-tuning"]
groups: ["Fine-tuning", "live_tests", "mock_tests"]
}
isolated function testListFineTuningEvents(TestData testData) returns error? {
string fine_tuning_job_id = testData.jobId;
Expand All @@ -202,7 +202,7 @@ isolated function testListFineTuningEvents(TestData testData) returns error? {
@test:Config {
dependsOn: [testCreateFineTuningJob],
dataProvider: dataGen,
groups: ["Fine-tuning"]
groups: ["Fine-tuning", "live_tests", "mock_tests"]
}
isolated function testListFineTuningJobCheckpoints(TestData testData) returns error? {
string fine_tuning_job_id = testData.jobId;
Expand All @@ -215,7 +215,7 @@ isolated function testListFineTuningJobCheckpoints(TestData testData) returns er
dependsOn: [testCreateFineTuningJob],
dataProvider: dataGen,
enable: isLiveServer ? false : true, // Enable this test only for mock server.
groups: ["Fine-tuning"]
groups: ["Fine-tuning", "mock_tests"]
}
isolated function testCancelFineTuningJob(TestData testData) returns error? {
string fine_tuning_job_id = testData.jobId;
Expand Down

0 comments on commit 3c48274

Please sign in to comment.