git-proxy icon indicating copy to clipboard operation
git-proxy copied to clipboard

fix: config schema

Open msagi opened this issue 1 year ago • 2 comments

Fix for #509.

  • Updated the schema which did not seem to be correct as per the schema spec ("oneOf" should go under "properties" not the other way around).
  • Moved config file validation logic into the config file module for improved encapsulation
  • Added a few positive and negative test scenarios for config files

@JamieSlome: should GitProxy always validate the config file when starting? It seems it only runs the validation if -v/--validate is present.

msagi avatar Apr 13 '24 13:04 msagi

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
Latest commit cf6aa7523bf1242da2de3045630fdf8c11c14ff2
Latest deploy log https://app.netlify.com/sites/endearing-brigadeiros-63f9d0/deploys/662770d0da522600080aab91

netlify[bot] avatar Apr 13 '24 13:04 netlify[bot]

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.69%. Comparing base (71f84e5) to head (cf6aa75).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #526      +/-   ##
==========================================
+ Coverage   64.23%   64.69%   +0.45%     
==========================================
  Files          40       40              
  Lines        1191     1198       +7     
==========================================
+ Hits          765      775      +10     
+ Misses        426      423       -3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Apr 13 '24 13:04 codecov[bot]

@msagi - I think we should make it such that we validate the config prior to starting the service.

JamieSlome avatar Apr 18 '24 13:04 JamieSlome

@msagi - can we create a fixtures folder in the test folder to store all of the mock data?

JamieSlome avatar Apr 18 '24 13:04 JamieSlome