theforeman / foreman_default_hostgroup

A plugin to set the default hostgroup when hosts are created.
GNU General Public License v3.0
11 stars 29 forks source link

Add shared GitHub Actions workflow for ruby #62

Closed archanaserver closed 1 month ago

archanaserver commented 7 months ago

Used theforeman/actions reusable workflows for the GHA config.

https://github.com/theforeman/actions?tab=readme-ov-file#foreman-plugin-tests

Also added Gemfile and updated .rubocop.yml file to resolve error. Look for commit for more details.

archanaserver commented 7 months ago

WIP https://github.com/theforeman/foreman_default_hostgroup/pull/63

ekohl commented 6 months ago

Please rebase now that #63 is merged.

ekohl commented 6 months ago

Could you implement what https://github.com/theforeman/foreman_default_hostgroup/pull/60#discussion_r1348314077 suggests? Otherwise it's broken.

archanaserver commented 6 months ago

@ekohl after making https://github.com/theforeman/foreman_default_hostgroup/pull/62/commits/d6874423adc1f91276a6690fbad853222dab48d5 changes, at this point i'm not sure what to look for to resolve this issue.

ekohl commented 5 months ago

I get the impression it's not patching the class, for whatever reason. It's unclear if this is also a problem outside of the tests.

archanaserver commented 4 months ago

@ekohl I still don't understand what I have to do here, do you have any other thoughts?

evgeni commented 2 months ago

I get the impression it's not patching the class, for whatever reason. It's unclear if this is also a problem outside of the tests.

It's patching the class just fine. The tests use the wrong class (Host::Managed, not HostFactImporter!) which didn't have a import_facts since Foreman 2.2 (https://github.com/theforeman/foreman/commit/5253d21ed7d690e80e595a075d06f96d2e211e8c)

evgeni commented 2 months ago

Well, the "real" problem is 66ad79c80321893084a1d19a26ce300ad0abb341 moved the patching from Host to HostFactImporter, but now the methods do not really make sense… IMHO

But at least they work?