G-Node / tonic

Framework for building services that interact with GIN
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Add user ID to session table and test routing #33

Closed achilleas-k closed 3 years ago

achilleas-k commented 3 years ago

Each session in the database now stores the user ID that owns it. This saves us from needing to contact the GIN service every time a job or the job log needs to be retrieved.

Fixed a bug where users could view jobs they don't own.

Added tests for routing:

codecov[bot] commented 3 years ago

Codecov Report

Merging #33 (40fa5d5) into master (b1a87ec) will increase coverage by 12.41%. The diff coverage is 35.71%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master      #33       +/-   ##
===========================================
+ Coverage   45.18%   57.59%   +12.41%     
===========================================
  Files           8        8               
  Lines         467      474        +7     
===========================================
+ Hits          211      273       +62     
+ Misses        234      166       -68     
- Partials       22       35       +13     
Impacted Files Coverage Δ
tonic/routes.go 40.00% <30.76%> (+33.71%) :arrow_up:
tonic/db/session.go 81.25% <100.00%> (+1.25%) :arrow_up:
tonic/worker/worker.go 52.68% <0.00%> (+2.15%) :arrow_up:
tonic/form/forms.go 87.50% <0.00%> (+6.25%) :arrow_up:

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 b1a87ec...40fa5d5. Read the comment docs.