diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0be02470..5cc23bcd 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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 @@ -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' diff --git a/README.md b/README.md index 1e00c61e..6185b647 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/lib/discovery.rake b/lib/foreman_discovery.rake similarity index 80% rename from lib/discovery.rake rename to lib/foreman_discovery.rake index 8ff8ac0f..06bc9ebf 100644 --- a/lib/discovery.rake +++ b/lib/foreman_discovery.rake @@ -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'] @@ -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 diff --git a/lib/foreman_discovery/engine.rb b/lib/foreman_discovery/engine.rb index 45607ddf..0326130f 100644 --- a/lib/foreman_discovery/engine.rb +++ b/lib/foreman_discovery/engine.rb @@ -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