-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests, simpleget: replace use of test-snapd-curl with simpleget where possible, support request headers #14884
base: master
Are you sure you want to change the base?
Conversation
eea4557
to
f47a997
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #14884 +/- ##
==========================================
+ Coverage 78.20% 78.29% +0.08%
==========================================
Files 1151 1154 +3
Lines 151396 152620 +1224
==========================================
+ Hits 118402 119491 +1089
- Misses 25662 25758 +96
- Partials 7332 7371 +39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one suggestion on the python side.
tests/lib/tools/simpleget
Outdated
if opts.header: | ||
for hdr in opts.header: | ||
sp = hdr.split(": ") | ||
if len(sp) != 2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use str.partition https://docs.python.org/3/library/stdtypes.html#str.partition which is somewhat like strings.Cut in Go
Add support for setting request headers using curl-like syntax. Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
Replace uses of test-snapd-curl with simpleget in an attempt to reduce the number of external dependencies installed by the tests. Signed-off-by: Maciej Borzecki <maciej.borzecki@canonical.com>
7f15512
to
deb25c7
Compare
Add support for setting request headers to simpleget and replace uses of test-snapd-curl with simpleget in an attempt to reduce the number of external dependencies installed by the tests.
Related: SNAPDENG-34225
Thanks for helping us make a better snapd!
Have you signed the license agreement and read the contribution guide?