Skip to content
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

[15.0][MIG] component: Migration to 15.0 #423

Merged
merged 1 commit into from
Nov 29, 2021

Conversation

yankinmax
Copy link
Contributor

@yankinmax yankinmax commented Nov 25, 2021

ref: BSRD-470

component/tests/common.py Outdated Show resolved Hide resolved
component/tests/common.py Outdated Show resolved Hide resolved
@yankinmax
Copy link
Contributor Author

@simahawk it used to work. Now registry isn't cleaned anymore. I got errors on tests:

TypeError: Component 'component1' (in class <class 'odoo.addons.component.tests.test_build_component.TestBuildComponent.test_register.<locals>.Component1'>) already exists

Tried self.registry.reset_changes() from
https://www.odoo.com/documentation/15.0/developer/reference/backend/testing.html#odoo.tests.common.TransactionCase.
Doesn't help.

@yankinmax yankinmax force-pushed the 15.0-mig-component branch 2 times, most recently from b7d75d3 to 9096fe0 Compare November 25, 2021 16:14
@yankinmax
Copy link
Contributor Author

@simahawk it runs without issues locally, and also base_rest with this variant runs

@simahawk
Copy link
Contributor

the point is not if it works or not. The point is that the setup should happen on the class and not on each test. I'll have a look tomorrow.

@yankinmax
Copy link
Contributor Author

the point is not if it works or not. The point is that the setup should happen on the class and not on each test. I'll have a look tomorrow.

I hope it's. I watched your OCA video about testing techniques

component/tests/common.py Outdated Show resolved Hide resolved
component/tests/common.py Outdated Show resolved Hide resolved
component/tests/common.py Outdated Show resolved Hide resolved
component/tests/common.py Outdated Show resolved Hide resolved
Copy link
Member

@dreispt dreispt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing commit history
Please follow the migration procedure here:
https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

@simahawk
Copy link
Contributor

simahawk commented Nov 26, 2021

Missing commit history Please follow the migration procedure here: https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-15.0

@dreispt you are late 🤣 The history is there because the repo has been re-initialized w/ modules uninstallable 😉

See #420 (comment)

component/tests/common.py Show resolved Hide resolved
@simahawk
Copy link
Contributor

pls squash the last commit once you have done

[UPD] connector settings to include component
@dreispt
Copy link
Member

dreispt commented Nov 26, 2021

@simahawk I was just flying by. Not that I read it, but I updated #418 accordingly.

@dreispt dreispt self-requested a review November 26, 2021 10:59
component/tests/common.py Show resolved Hide resolved
@simahawk
Copy link
Contributor

@simahawk I was just flying by. Not that I read it, but I updated #418 accordingly.

alright, thanks!

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simahawk simahawk mentioned this pull request Nov 26, 2021
6 tasks
@yankinmax
Copy link
Contributor Author

@simahawk definitely didn't pay attention to other modules. Will also update test_component, but to me makes sense not to open separate PR and add just new commit here. Is it ok?

@simahawk
Copy link
Contributor

no, because the module is called test_component for a reason ;)

@simahawk
Copy link
Contributor

test_component migrated on #424

@simahawk
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 15.0-ocabot-merge-pr-423-by-simahawk-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit bcf9f90 into OCA:15.0 Nov 29, 2021
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 70f5dc1. Thanks a lot for contributing to OCA. ❤️

@john-herholz-dt
Copy link

Hello @simahawk , can you give a short explanation why SavepointComponentCase was removed from the tests?
I work with a module that relies on it.

Thanks

@danielduqma
Copy link
Contributor

danielduqma commented Dec 22, 2022

Hello @john-herholz-dt,

I just ran into the same problem, and I found that SavepointCase was merged into TransactionCase. Just replace SavepointComponentCase by TransactionComponentCase and it should work. More info.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants