Skip to content

Commit

Permalink
chore(tests): fix runs e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aallam committed Nov 24, 2023
1 parent 9b1322a commit 61c2733
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.aallam.openai.client

import com.aallam.openai.api.assistant.AssistantTool
import com.aallam.openai.api.assistant.assistantRequest
import com.aallam.openai.api.core.Status
import com.aallam.openai.api.model.ModelId
import com.aallam.openai.api.run.RunRequest
import com.aallam.openai.api.run.ThreadRunRequest
Expand All @@ -27,15 +28,10 @@ class TestRuns : TestOpenAI() {
var retrieved = openAI.getRun(threadId = thread.id, runId = run.id)
assertEquals(run.id, retrieved.id)

val canceled = openAI.cancel(threadId = thread.id, runId = run.id)
assertEquals(run.id, canceled.id)

val metadata = mapOf("modified" to "true", "user" to "aallam")
val modified = openAI.updateRun(threadId = thread.id, runId = run.id, metadata = metadata)
assertEquals(metadata, modified.metadata)

val runs = openAI.runs(threadId = thread.id)
assertEquals(1, runs.size)

openAI.cancel(threadId = thread.id, runId = run.id)
}

@Test
Expand Down

0 comments on commit 61c2733

Please sign in to comment.