OCA / interface-github

Tools to interact with github from Odoo
GNU Affero General Public License v3.0
46 stars 77 forks source link

[RFC]How to test interface-github modules in runbot? #12

Closed elicoidal closed 4 years ago

elicoidal commented 6 years ago

Currently the OCA repo is set as demo data in interface-github modules which makes it unpractical to test given the quantity of repositories and modules:

Potential solutions:

cc @OCA/board

legalsylvain commented 6 years ago

Hi @elicoidal. to test this module on Runbot, we should have access to the openerp.cfg file. Do you know if its possible to change it. (otherwise, it would fail because credential are required)

About your solution

remove and do not replace current organization (and the tester tries with his own)

No need to remove. Just not call sync in the test file. I think this a good and complete demo data.

create a demo_oca organization with demo repository and module sample (this could be used in other places or tests)

It's a possibility.

regards.

elicoidal commented 6 years ago

@OCA/board any idea (I have no clue about cfg file) and I am personally in favor of creating a demo organization

moylop260 commented 6 years ago

What about mock to simulate the response of the github?

We had a similar issue related with weblate. Instead of create a weblate demo we just created a mock:

I just searched rgrep "mock" . --include=*.py --exclude-dir=setup And there are other good examples, like as Spain:

elicoidal commented 6 years ago

@moylop260 I think mock can be a good idea too. Wouldnot it be complex to set up for such an environment as Github?

moylop260 commented 6 years ago

Maybe, if you use a sniffer of request could get all the universe of cases.

I dont know it

But if it is too complex then let’s to use a demo org as well.

pedrobaeza commented 4 years ago

Closing this as answered and demo org added.