Skip to content

Commit

Permalink
Add Tests for AgentService Interface
Browse files Browse the repository at this point in the history
Signed-off-by: Future-Outlier <[email protected]>
  • Loading branch information
Future-Outlier committed Jun 23, 2024
1 parent 8fc782f commit 0803569
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions flyteplugins/go/tasks/pluginmachinery/core/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,17 @@ func TestLoadPlugin(t *testing.T) {
})

}

func TestAgentService(t *testing.T) {
agentService := core.AgentService{}
taskTypes := []core.TaskType{"sensor", "chatgpt"}

for _, taskType := range taskTypes {
assert.Equal(t, false, agentService.ContainTaskType(taskType))
}

agentService.SetSupportedTaskType(taskTypes)
for _, taskType := range taskTypes {
assert.Equal(t, true, agentService.ContainTaskType(taskType))
}
}

0 comments on commit 0803569

Please sign in to comment.