Closed minor-fixes closed 1 year ago
Merging #132 (a0c6907) into master (1cc1077) will decrease coverage by
0.22%
. The diff coverage is92.78%
.
@@ Coverage Diff @@
## master #132 +/- ##
==========================================
- Coverage 90.61% 90.38% -0.23%
==========================================
Files 26 27 +1
Lines 1065 1103 +38
==========================================
+ Hits 965 997 +32
- Misses 100 106 +6
Impacted Files | Coverage Δ | |
---|---|---|
nomad/api/base.py | 96.55% <85.71%> (-1.04%) |
:arrow_down: |
nomad/api/event.py | 86.66% <86.66%> (ø) |
|
nomad/__init__.py | 97.89% <100.00%> (-0.34%) |
:arrow_down: |
nomad/api/__init__.py | 100.00% <100.00%> (ø) |
|
nomad/api/exceptions.py | 100.00% <100.00%> (ø) |
|
nomad/api/job.py | 94.59% <100.00%> (+0.22%) |
:arrow_up: |
nomad/api/jobs.py | 90.00% <100.00%> (+0.41%) |
:arrow_up: |
nomad/api/agent.py | 92.85% <0.00%> (-7.15%) |
:arrow_down: |
nomad/api/node.py | 87.69% <0.00%> (+3.07%) |
:arrow_up: |
... and 1 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Hey @minor-fixes, thanks for the PR! The tests are passing, seems like some issue with the secret to the test pypi (even though the secret looks correct) thats causing the failure. I'll have to figure that out to get this out for a release.
Thanks @minor-fixes!
This PR allows the caller to inject a
requests.Session
object that the Nomad client should use to make all requests, in case the client is used in an environment where cookies/headers/etc. unrelated to Nomad communication must be added to each request.Tested - both examples below with this change:
Something like this in my environment fails, as it redirects to an auth server: (URLs and other bits changed/redacted below)
prints:
whereas preparing and supplying a session:
prints:
num jobs: 20