-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Coverage for graphite.whitelist #1572
Conversation
Current coverage is 56.73%@@ master #1572 diff @@
==========================================
Files 52 52
Lines 5781 5780 -1
Methods 0 0
Messages 0 0
Branches 1111 1111
==========================================
+ Hits 3252 3279 +27
+ Misses 2328 2300 -28
Partials 201 201
|
Thank you for this, @cbowman0 |
* Fix graphite.whitelist.load_whitelist() * Add test cases for show, add and remove * Test save_whitelist failure scenarios
3a00d67
to
cddfe40
Compare
I adjusted the testing to be deterministic. I would like someone else from @graphite-project/committers to confirm the changes to load_whitelist() is ok. Once that is merged, I will help @gwaldo with adjusting the test cases to work with his wording changes, if required. |
@cbowman0 why the change from graphite-web/webapp/graphite/util.py Lines 159 to 212 in af7c0c1
|
@obfuscurity Because it currently doesn't work. Calls to load_whitelist() error with: |
Ah right, we're loading from a file, not a string. Looks like a typo from c198e58. Yeah, this change looks good. 👍 |
Alternatively, we can do:
and add set to the PICKLE_SAFE set. I can do that quickly, if that's preferred. |
@cbowman0 Yeah, good idea. |
Done. Once automated checks go green again, I'll merge it. |
I had this mostly together, so in light of issue #1569 and pull request #1570, I submit this for test cases before the wording changes.
Of note, the load_whitelist() function was not working before this change. If the preferred method is to read the blob in and use unpickle.loads(), then that can be done.