(t *testing.T)
| 12 | ) |
| 13 | |
| 14 | func TestOpenCodeEngine(t *testing.T) { |
| 15 | engine := NewOpenCodeEngine() |
| 16 | |
| 17 | t.Run("engine identity and capabilities", func(t *testing.T) { |
| 18 | capabilities := engine.GetCapabilities() |
| 19 | assert.Equal(t, "opencode", engine.GetID(), "Engine ID should be 'opencode'") |
| 20 | assert.Equal(t, "OpenCode", engine.GetDisplayName(), "Display name should be 'OpenCode'") |
| 21 | assert.True(t, engine.IsExperimental(), "OpenCode engine should be experimental") |
| 22 | assert.False(t, capabilities.ToolsAllowlist, "Should not support tools allowlist") |
| 23 | assert.True(t, capabilities.MaxTurns, "Should support max turns") |
| 24 | assert.False(t, capabilities.WebSearch, "Should not support built-in web search") |
| 25 | }) |
| 26 | |
| 27 | t.Run("model env var name", func(t *testing.T) { |
| 28 | assert.Equal(t, constants.OpenCodeCLIModelEnvVar, engine.GetModelEnvVarName(), "Should return OPENCODE_MODEL") |
| 29 | }) |
| 30 | } |
| 31 | |
| 32 | func TestOpenCodeEngineInstallationAndExecution(t *testing.T) { |
| 33 | engine := NewOpenCodeEngine() |
nothing calls this directly
no test coverage detected