Skip to content

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

Merged
OCA-git-bot merged 1 commit intoOCA:15.0from
yankinmax:15.0-mig-component
Nov 29, 2021
Merged

[15.0][MIG] component: Migration to 15.0#423
OCA-git-bot merged 1 commit intoOCA:15.0from
yankinmax:15.0-mig-component

Conversation

@yankinmax
Copy link
Copy Markdown
Contributor

@yankinmax yankinmax commented Nov 25, 2021

ref: BSRD-470

@yankinmax
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

@simahawk
Copy link
Copy Markdown
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
Copy Markdown
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

Copy link
Copy Markdown
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.

@simahawk
Copy link
Copy Markdown
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)

@simahawk
Copy link
Copy Markdown
Contributor

pls squash the last commit once you have done

[UPD] connector settings to include component
@dreispt
Copy link
Copy Markdown
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
@simahawk
Copy link
Copy Markdown
Contributor

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

alright, thanks!

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

@simahawk
Copy link
Copy Markdown
Contributor

test_component migrated on #424

@simahawk
Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@john-herholz-dt
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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