mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-21 08:15:23 -04:00
[PR #202] [MERGED] test: add unit tests for pkg/providers/embeddings package #232
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/vxcontrol/pentagi/pull/202
Author: @mason5052
Created: 3/12/2026
Status: ✅ Merged
Merged: 3/20/2026
Merged by: @asdek
Base:
feature/next_release← Head:test/embeddings-provider-coverage📝 Commits (1)
c4d4a30test: add unit tests for pkg/providers/embeddings package📊 Changes
1 file changed (+168 additions, -0 deletions)
View changed files
➕
backend/pkg/providers/embeddings/embedder_test.go(+168 -0)📄 Description
Description of Change
Problem: The
pkg/providers/embeddingspackage has no unit test coverage. This package provides the embedding provider factory supporting 7 providers (OpenAI, Ollama, Mistral, Jina, Huggingface, GoogleAI, VoyageAI) used for vector store operations.Solution: Add unit tests for the New() factory function covering all 7 supported providers, the "none" provider, unsupported provider error handling, custom URL/key/model configuration, and IsAvailable() behavior for both valid and nil embedders.
Type of Change
Areas Affected
Testing and Verification
Test Configuration
Test Steps
go test ./pkg/providers/embeddings/... -vTest Results
Checklist
go fmtandgo vetrun🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.