motiv-labs / janus

An API Gateway written in Go
https://hellofresh.gitbooks.io/janus
MIT License
2.78k stars 318 forks source link

PT-3583 Use memory repository when no mongo connection for basic auth pligin #386

Closed vgarvardt closed 5 years ago

vgarvardt commented 5 years ago

What does this PR do?

Basic auth plugin falls back to memory repository when no mongo session avaiable. This is the case when file backend is used for api definitions.

Refs https://github.com/hellofresh/janus/issues/385

codecov[bot] commented 5 years ago

Codecov Report

Merging #386 into master will increase coverage by 0.81%. The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #386      +/-   ##
==========================================
+ Coverage   40.32%   41.13%   +0.81%     
==========================================
  Files          75       75              
  Lines        2624     2662      +38     
==========================================
+ Hits         1058     1095      +37     
  Misses       1506     1506              
- Partials       60       61       +1
Impacted Files Coverage Δ
pkg/plugin/basic/setup.go 90% <71.42%> (+6.21%) :arrow_up:
pkg/proxy/balancer/weight.go 91.3% <0%> (-3.15%) :arrow_down:
pkg/proxy/balancer/rr.go 100% <0%> (ø) :arrow_up:
pkg/plugin/cb/setup.go 90.9% <0%> (+0.58%) :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 28dabbd...2f24796. Read the comment docs.

bghellofresh commented 5 years ago

+1

Approved with Zappr Approved with Zappr Approved with Zappr

RTodorov commented 5 years ago

+1

Approved with Zappr Approved with Zappr Approved with Zappr Approved with Zappr