-
Notifications
You must be signed in to change notification settings - Fork 341
Added authentication and https support for Solr and CloudSolr #228
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
Conversation
This looks great – think it makes sense to add a test to confirm that the values passed are actually forwarded on to the requests call? |
Thank you for your feedback. It definitely makes sense to add tests. I am
new to this stuff, so I am not exactly clear on where to put the tests.
Attached are the tests I ran in my works kerberized environment over https.
|
So I see where the testing is done in test_client.py and test_cloud.py, but
I am not exactly clear on how to add tests for authentication and https,
given those are unique to each environment.
|
Chris,
I apologize for flooding your inbox with my nonsense. My coworker notified
me of the logging module in Python. I applied that to my tests and have
created a log file. The log file shows that, when I ran test1, the values
passed are forwarded on to the requests call.
|
Ah, good. I was going to suggest using mock.patch to catch the underlying request so you could verify it was being included – e.g. in the SolrTestCase where setup mocks the _send_request so tests can call methods normally but then confirm that the arguments passed to the request include an expected value: Lines 224 to 226 in 356a5ec
Lines 448 to 449 in 356a5ec
|
How long will it be until we get a new release with this feature? |
I just cut 3.7.0 |
Can we change the version number pysolr.version to match the new branch number? |
It's supposed to be using setuptools_scm for that: https://github.com/django-haystack/pysolr/blob/master/pysolr.py#L60-L66 That's what I'm seeing after a clean install, too:
|
Hey, thanks for contributing to pysolr. Please confirm that the tests pass locally
Once your pull request has been submitted, the full test suite will be executed on https://travis-ci.org/django-haystack/pysolr/pull_requests. Pull requests with passing tests are far more likely to be reviewed and merged.