[MIG] auth_jwt_demo: Migration to 18.0#780
Conversation
This method is useful for public endpoints that need to work for anonymous user, but can be enhanced when an authenticated user is know. A typical use case is a "add to cart" enpoint that can work for anonymous users, but can be enhanced by binding the cart to a known customer when the authenticated user is known.
The unit tests were broken for non-functional reasons (interaction with the mock) and is easier to implement as integration test.
e1e86ff to
951a405
Compare
|
demo is there now, I had to ignore eslint for js test files, also warn message had to be ignored for CI test. |
|
|
||
| # Add filter to the specific logger | ||
| logger = logging.getLogger("odoo.addons.auth_jwt.models.ir_http") | ||
| logger.addFilter(IgnoreSpecificWarningFilter()) |
There was a problem hiding this comment.
We should not filter warnings like this.
If this warning is expect it we should capture it and test that it has been emitted with self.assertLogs
There was a problem hiding this comment.
can you give me an example?
There was a problem hiding this comment.
anyway, I am ignoring the warining log here as it causes test error in the run boat although it is intentional log from the base module.
I don't want to assert the log but I want to ingonre it from test wathcing errors.
|
Also, let's not change |
|
/ocabot migration auth_jwt_demo |
how can I exclude a file? |
Probably somewhere in this file server-auth/.pre-commit-config.yaml Line 115 in 0771ec7 |
951a405 to
5b4e615
Compare
|
@kobros-tech is this ready for review? |
to me yes, but I am waiting for @sbidoul to tell his opinion. |
5b4e615 to
a43fc56
Compare
|
@kobros-tech I'm finishing this in #846. The log capture you made here is too broad as we expect the warning in exactly one test. |
|
Thanks for you help with this migration nevertheless! |
Uh oh!
There was an error while loading. Please reload this page.