Skip to content
Draft
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
9 changes: 4 additions & 5 deletions lib/tasks/foreman_plugin_template_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ end
# Tests
namespace :test do
desc 'Test ForemanPluginTemplate'
Rake::TestTask.new(:foreman_plugin_template) do |t|
test_dir = File.expand_path('../../test', __dir__)
t.libs << 'test'
t.libs << test_dir
t.pattern = "#{test_dir}/**/*_test.rb"
Rake::TestTask.new(:foreman_plugin_template => 'db:test:prepare') do |t|
t.libs << ForemanPluginTemplate::Engine.root.join('test')
Copy link
Member

Choose a reason for hiding this comment

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

Before this, libs was ['test', File.expand_path('../../test', __dir__)], now it's only [ForemanPluginTemplate::Engine.root.join('test')], doesn't that mean the bare test one is not added anymore, which means the test helpers from Foreman are not available anymor?

Choose a reason for hiding this comment

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

t.pattern = ForemanPluginTemplate::Engine.root.join('test', '**', '*_test.rb')
t.test_files = [Rails.root.join('test/unit/foreman/access_permissions_test.rb')]
Copy link
Member

Choose a reason for hiding this comment

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

IMHO this is the important line of this PR and we should get that merged.

Choose a reason for hiding this comment

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

I also think that this should get merged because we just stumbled across some permissions issue during plugin development and I realized only now that this permissions test got lost during the move to the unified github actions workflow.

t.verbose = true
t.warning = false
end
Expand Down