Closed califlower closed 3 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.61%. Comparing base (
5ac8657
) to head (5c3c79d
). Report is 7 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I can add a test here, just wasn't sure about testing the race condition it was kind of difficult
I added a concurrent access test and a nil test. That should keep the coverage where it was at before
RIP. Doesn't seem like codecov is correct :<
The codecov is correct, I checked out your branch and this is what happens after running all tests.
The problem is the test.
func TestSpecIndex_GetAllComponentSchemas_NilIndex(t *testing.T) {
index := &SpecIndex{}
schemas := index.GetAllComponentSchemas()
assert.Nil(t, schemas, "Expected GetAllComponentSchemas to return nil when index is nil")
}
index
cannot be nil here, it will never be nil. To fix it:
func TestSpecIndex_GetAllComponentSchemas_NilIndex(t *testing.T) {
var index *SpecIndex
schemas := index.GetAllComponentSchemas()
assert.Nil(t, schemas, "Expected GetAllComponentSchemas to return nil when index is nil")
}
Ah my bad. Thank you for fixing it and merging! Really appreciate it!