-
Notifications
You must be signed in to change notification settings - Fork 3
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
PR-2930 add tests #169
PR-2930 add tests #169
Conversation
e067ba8
to
70940c1
Compare
}, | ||
{ | ||
"regex": r"(EDL-[A-Za-z0-9]+)[A-Za-z0-9]{40}([A-Za-z0-9]{10})", | ||
"replace": "\\g<1>XXX<EDLTOKEN>XXX\\g<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.
@bbuechler Did you ever need to look for a particular credential in the logs?
c95ece9
to
3c59d6a
Compare
6f2edc2
to
2bf4b6a
Compare
61e8535
to
eb5a3d2
Compare
@@ -0,0 +1,261 @@ | |||
import json | |||
import logging |
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.
Can we rename logging.py to something that doesn't potentially conflict with the standard one?
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.
What would you suggest? I purposefully used the same name so that it would be clear that these are extensions to the standard logging module, and it's already in the rain_api_core
namespace so there shouldn't be any conflicts.
eb5a3d2
to
c7657e9
Compare
864b2d2
to
3e4fd27
Compare
boto3==1.20.29 | ||
hypothesis==6.36.0 | ||
moto==2.3.1 | ||
pytest-cov==3.0.0 | ||
pytest-mock==3.6.1 | ||
pytest==6.2.5 |
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.
Not sure if we need to be pinning the dev dependencies or not
Closes #162
Closes #164
I rewrote the JSON logger to always output valid JSON. It would previously only output valid JSON if you passed in a json-like object into the log call such as
log.info({"foo": "bar"})
. I suspect that the quote replacement was there because when python print's dictionaries/strings it prints them in a way that looks very similar to JSON except that it uses single quotes (and of course there is no conversion of dictionary keys to strings which is required by the JSON spec) and this was being used as a budget JSON encoder.I changed some of the log censoring, but it might be better to just skip testing that for now and come back to it when we figure out how we want to handle it properly #163.