Merge pull request #1095 from trheyi/main

Update test for Config struct to clarify feature computation timing
This commit is contained in:
Max 2025-08-09 17:29:20 +08:00 committed by GitHub
commit f70f675d45
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -164,7 +164,13 @@ func TestConfig_UnmarshalJSON(t *testing.T) {
t.Errorf("Expected vector driver 'qdrant', got '%s'", config.Vector.Driver)
}
// Verify Features are computed automatically
// Verify that Features are not computed during UnmarshalJSON (they should be computed later)
// Features will be computed after providers are loaded in the actual Load function
// But we can manually compute features to test the logic
config.Features = config.ComputeFeatures()
// These should be true based on the config content (graph, pdf, ffmpeg are present)
if !config.Features.GraphDatabase {
t.Error("Expected GraphDatabase feature to be true")
}