(t *testing.T)
| 176 | } |
| 177 | |
| 178 | func TestEmbeddingProviderLabel(t *testing.T) { |
| 179 | if got := embeddingProviderLabel(nil); got != "null" { |
| 180 | t.Errorf("label(nil) = %q, want null", got) |
| 181 | } |
| 182 | if got := embeddingProviderLabel(embedding.NewNull()); got != "null" { |
| 183 | t.Errorf("label(Null) = %q, want null", got) |
| 184 | } |
| 185 | t.Setenv("CHATCLI_EMBED_PROVIDER", "bedrock") |
| 186 | p, err := embedding.NewFromEnv() |
| 187 | if err != nil { |
| 188 | t.Fatalf("NewFromEnv: %v", err) |
| 189 | } |
| 190 | if got := embeddingProviderLabel(p); !strings.HasPrefix(got, "bedrock:") { |
| 191 | t.Errorf("label = %q, want bedrock:*", got) |
| 192 | } |
| 193 | } |
nothing calls this directly
no test coverage detected