(t *testing.T)
| 28 | } |
| 29 | |
| 30 | func TestExecMissingKeys(t *testing.T) { |
| 31 | t.Parallel() |
| 32 | t.Run("cli plugin exec", func(t *testing.T) { |
| 33 | res, err := ExecWithContext(t.Context(), "docker", "agent", "run", "--exec", "./test-agent.yaml") |
| 34 | require.Error(t, err) |
| 35 | require.Contains(t, res.Stderr, "environment variables must be set") |
| 36 | require.Contains(t, res.Stderr, "OPENAI_API_KEY") |
| 37 | }) |
| 38 | |
| 39 | t.Run("docker-agent exec", func(t *testing.T) { |
| 40 | res, err := ExecWithContext(t.Context(), binDir+"/docker-agent", "run", "--exec", "./test-agent.yaml") |
| 41 | require.Error(t, err) |
| 42 | require.Contains(t, res.Stderr, "environment variables must be set") |
| 43 | require.Contains(t, res.Stderr, "OPENAI_API_KEY") |
| 44 | }) |
| 45 | } |
| 46 | |
| 47 | func TestAutoComplete(t *testing.T) { |
| 48 | t.Parallel() |
nothing calls this directly
no test coverage detected