Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Conversation

@felipao-mx
Copy link
Member

implements a middleware that sends requests information to a log ingestion server (Logstash)

@codecov
Copy link

codecov bot commented Jul 19, 2022

Codecov Report

Merging #116 (20e025f) into main (79ff0fc) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main      #116   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         9    +1     
  Lines          273       356   +83     
  Branches        48        65   +17     
=========================================
+ Hits           273       356   +83     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
fast_agave/middlewares/__init__.py 100.00% <100.00%> (ø)
fast_agave/middlewares/loggers.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.


@pytest.fixture(autouse=True)
def patch_log_server_url(monkeypatch):
monkeypatch.setenv('LOGS_SERVER_URL', 'http://logs.com')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

que se quiere probar aquí?

async def dispatch(
self, request: Request, call_next: RequestResponseEndpoint
) -> Response:
if not os.environ.get('LOGS_SERVER_URL', ''):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

porque se manda a llamar dentro de la función y no como una variable global?

Copy link
Contributor

@pachCode pachCode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Algunas observaciones

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants