Skip to content

Commit

Permalink
Rename rake task discovery -> foreman_discovery
Browse files Browse the repository at this point in the history
  • Loading branch information
stejskalleos committed Jan 29, 2024
1 parent 1a11647 commit 09ef603
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Layout/SpaceAfterComma:
Exclude:
- 'app/helpers/discovered_hosts_helper.rb'
- 'app/models/host/discovered.rb'
- 'lib/discovery.rake'
- 'lib/foreman_discovery.rake'
- 'test/unit/host_discovered_test.rb'

# Offense count: 1
Expand Down Expand Up @@ -820,7 +820,7 @@ Style/ConditionalAssignment:
Exclude:
- 'app/helpers/discovery_rules_helper.rb'
- 'app/models/host/discovered.rb'
- 'lib/discovery.rake'
- 'lib/foreman_discovery.rake'
- 'test/functional/discovered_hosts_controller_test.rb'
- 'test/unit/discovered_extensions_test.rb'

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ instead of github.com issues. Please report issues there.

There are unit and integration tests in the repository, to run them execute the following in the *Foreman core* directory:

bundle exec rake test:discovery
bundle exec rake test:foreman_discovery

It is possible to execute a single test, however the path must be *absolute* (e.g. use `$HOME` variable):

bundle exec rake test:discovery TEST=~/work/foreman_discovery/test/unit/host_discovered_test.rb
bundle exec rake test:foreman_discovery TEST=~/work/foreman_discovery/test/unit/host_discovered_test.rb

# Copyright

Expand Down
6 changes: 3 additions & 3 deletions lib/discovery.rake → lib/foreman_discovery.rake
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Setup Tests
namespace :test do
desc "Test Discovery plugin"
Rake::TestTask.new(:discovery) do |t|
Rake::TestTask.new(:foreman_discovery) do |t|
test_dir = File.join(File.dirname(__FILE__), '..', 'test')
t.libs << ["test",test_dir]
if ENV['FILE'] || ENV['TEST']
Expand All @@ -14,13 +14,13 @@ namespace :test do
end
end
Rake::Task[:test].enhance do
Rake::Task['test:discovery'].invoke
Rake::Task['test:foreman_discovery'].invoke
end

load 'tasks/jenkins.rake'
if Rake::Task.task_defined?(:'jenkins:unit')
# The "unit" tests also include system tests
Rake::Task["jenkins:unit"].enhance(['webpack:compile']) do
Rake::Task['test:discovery'].invoke
Rake::Task['test:foreman_discovery'].invoke
end
end
2 changes: 1 addition & 1 deletion lib/foreman_discovery/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ class Engine < ::Rails::Engine
end

rake_tasks do
load "discovery.rake"
load "foreman_discovery.rake"
Rake::Task['db:seed'].enhance do
ForemanDiscovery::Engine.load_seed
end
Expand Down

0 comments on commit 09ef603

Please sign in to comment.