canonical / ubuntu-com-security-api

The API for CVEs and USNs data.
17 stars 9 forks source link

Add test for GET /security/cves.json endpoint #87

Closed nottrobin closed 2 years ago

nottrobin commented 2 years ago

I wrote this because it occurred to me that https://github.com/canonical-web-and-design/ubuntu-com-security-api/pull/85#issuecomment-1072206182 should have been picked up by a test, but wasn't. Although, I actually tried to break this test by reverting the code to that state, and it didn't break :( that's because for some reason the mocked test data doesn't seem to run into the case that leads to that particular error. I tried to track down what data I could create that would have caused that error, but I couldn't work it out. It's a shame, but I don't think it's worth spending a lot of time on since it's just one edge-case that may never crop up again.

QA

Check tests pass