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

Rails 7.1 / Rails 7.0 compatible changes #9336

Merged
merged 2 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/security_group_helper/textual_summary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def port_range_helper(rule)
elsif rule.port == rule.end_port
rule.port.to_s
else
rule.port_range.to_s(:dash)
rule.port_range.to_fs(:dash)
end
end
end
4 changes: 2 additions & 2 deletions spec/controllers/ems_cloud_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@
expect(ems).to receive(:sync_users_queue)
post :sync_users, :params => {:id => ems.id, :sync => "", :admin_role => 1, :member_role => 2}
expect(session[:flash_msgs]).to match [a_hash_including(:message => "Sync users queued.", :level => :success)]
expect(response.body).to include("redirected")
expect(response.body).to include("ems_cloud/#{ems.id}")
expect(response.status).to eq(302)
assert_redirected_to(controller.ems_cloud_path(ems.id))
end

it "returns error if admin role is not selected" do
Expand Down
12 changes: 6 additions & 6 deletions spec/controllers/ems_infra_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@
post :scaling, :params => { :id => @ems.id, :scale => "", :orchestration_stack_id => @orchestration_stack.id,
@orchestration_stack_parameter_compute.name => 2 }
expect(controller.send(:flash_errors?)).to be_falsey
expect(response.body).to include("redirected")
expect(response.body).to include("ems_infra")
expect(response.status).to eq(302)
assert_redirected_to(controller.ems_infra_path(@ems.id))
expect(session[:flash_msgs]).to match [a_hash_including(:message => "Scaling compute-1::count from 1 to 2 ", :level => :success)]
end

Expand Down Expand Up @@ -266,8 +266,8 @@
post :scaledown, :params => {:id => @ems.id, :scaledown => "",
:orchestration_stack_id => @orchestration_stack.id, :host_ids => [@host2.id]}
expect(controller.send(:flash_errors?)).to be_falsey
expect(response.body).to include("redirected")
expect(response.body).to include("ems_infra")
expect(response.status).to eq(302)
assert_redirected_to(controller.ems_infra_path(@ems.id))
expect(session[:flash_msgs]).to match [a_hash_including(:message => " Scaling down to 1 compute nodes", :level => :success)]
end

Expand Down Expand Up @@ -299,8 +299,8 @@
.to receive(:register_and_configure_nodes).and_return("SUCCESS")
post :register_nodes, :params => {:id => @ems.id, :nodes_json => @nodes_example, :register => 1}
expect(controller.send(:flash_errors?)).to be_falsey
expect(response.body).to include("redirected")
expect(response.body).to include("ems_infra")
expect(response.status).to eq(302)
assert_redirected_to(%r(#{controller.ems_infra_path(@ems.id)}))
Copy link
Member Author

@jrafanie jrafanie Feb 5, 2025

Choose a reason for hiding this comment

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

I use a regex here as I didn't think it was necessary to test the whole URL, such as:

http://test.host/ems_infra/1040?display=hosts&flash_msg=Nodes+were+added+successfully.+Refresh+queued.

end

it "when failure expected, workflow service not reachable" do
Expand Down