theforeman / foreman_fog_proxmox

Foreman plugin to add Proxmox compute resource based on fog-proxmox gem
GNU General Public License v3.0
105 stars 30 forks source link

Rails tests fail as plugin is using method which is removed in latest version of foreman #199

Closed Manisha15 closed 3 years ago

Manisha15 commented 3 years ago

Describe the bug Foreman_fog_proxmox tests fails with the latest version of foreman as it removed the args_for_compute_resource_partial method in the following PR: https://github.com/theforeman/foreman/pull/8393/files#diff-d04bd7cb69e9ca38bdb7588d8820a25adb5dc8449fe2cccf1a53e6391e00e576L307

To Reproduce Steps to reproduce the behavior:

  1. Running the jenkins test for foreman_fog_proxmox fails with the error ActionView::Template::Error: undefined method 'args_for_compute_resource_partial' for #<#<Class:0x0000000011fcc130>:0x000000000d85d268> app/views/compute_attributes/_compute_form.html.erb:23 app/views/compute_attributes/_form.html.erb:28 app/views/compute_attributes/_form.html.erb:7 app/helpers/form_helper.rb:287:in `form_for' app/views/compute_attributes/_form.html.erb:1 app/views/compute_attributes/edit.html.erb:23 app/controllers/concerns/foreman/controller/timezone.rb:10:in 'set_timezone' app/models/concerns/foreman/thread_session.rb:32:in 'clear_thread' app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in 'set_topbar_sweeper_controller' test/controllers/compute_attributes_controller_test.rb:33:in 'block in <class:ComputeAttributesControllerTest>' (ActionView::Template::Error) /home/jenkins/workspace/foreman_bootdisk-pull-request/database/postgresql/label/fast/ruby/2.5/foreman/app/views/compute_attributes/_compute_form.html.erb:23
  2. Other tests are failing with the access_permission issue as follows: https://ci.theforeman.org/job/foreman_bootdisk-pull-request/156/database=postgresql,label=fast,ruby=2.5/testReport/

Expected behavior The tests should run successfully.

Additional context The PR in foreman_bootdisk using foreman_fog_proxmox failing the foreman_fog_proxmox tests is as follows: https://github.com/theforeman/foreman_bootdisk/pull/90

tristanrobert commented 3 years ago

Latest stable Foreman release is 2.4.0. Nightly builds are unstable and changes could be made again. So when it would be stable (2.5.0 released) all new changes will be made in the plugin to be suitable.

ahoiroman commented 3 years ago

Foreman 2.5 is out now. Would be great to see an upgrade.

VendettaMike commented 3 years ago

Confirmed the behaviour with a fresh install of Foreman 2.5.1 and fog-proxmox 0.13.3. Have been looking forward to using this plugin so hopefully it gets updated soon.

ezr-ondrej commented 3 years ago

I'm sorry for introducing this... I thought I was scanning through the org code :thinking: I wish we would have proper plugin API :(