Merge pull request #1095 from trheyi/main
Update test for Config struct to clarify feature computation timing
This commit is contained in:
commit
f70f675d45
1 changed files with 7 additions and 1 deletions
|
|
@ -164,7 +164,13 @@ func TestConfig_UnmarshalJSON(t *testing.T) {
|
||||||
t.Errorf("Expected vector driver 'qdrant', got '%s'", config.Vector.Driver)
|
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 {
|
if !config.Features.GraphDatabase {
|
||||||
t.Error("Expected GraphDatabase feature to be true")
|
t.Error("Expected GraphDatabase feature to be true")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue