ONSdigital / sdx-seft-consumer-service

Microservice for consuming SEFT files from RAS and sending to ONS internal
MIT License
1 stars 1 forks source link

Fixing health check and unit tests #48

Closed warrenbailey closed 6 years ago

warrenbailey commented 6 years ago

What? and Why?

Fixing broken health check and refactoring code to make it more readable

Checklist

codecov-io commented 6 years ago

Codecov Report

Merging #48 into master will increase coverage by 0.19%. The diff coverage is 28.16%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #48      +/-   ##
=========================================
+ Coverage   81.31%   81.5%   +0.19%     
=========================================
  Files          12      13       +1     
  Lines         910     914       +4     
=========================================
+ Hits          740     745       +5     
+ Misses        170     169       -1
Impacted Files Coverage Δ
app/main.py 78.76% <100%> (+15.58%) :arrow_up:
app/tests/test_healthchecks.py 62.22% <16.66%> (-1.42%) :arrow_down:
app/health.py 29.31% <29.31%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 590139c...4785aa6. Read the comment docs.

warrenbailey commented 6 years ago

Good spot, I think the async threading model is broken, not sure how this ever worked. I'll fix it.

warrenbailey commented 6 years ago

The health check URL is broken and probably has never worked correctly. I suggest we just return 200OK if the application is running as the URL isn't in use anyway. It'll become more important when we move to cloud foundry