foreman_discovery 23.0.0 → 23.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/discovered_hosts_controller.rb +2 -1
- data/lib/discovery.rake +2 -1
- data/lib/foreman_discovery/version.rb +1 -1
- data/test/functional/discovered_hosts_controller_test.rb +1 -1
- data/test/functional/discovery_rules_controller_test.rb +0 -6
- data/test/integration/menu_test.rb +8 -0
- data/test/unit/host_discovered_test.rb +2 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b69845e9ddecb5fa7fd464c1cf9bdc30aa7a4841adb8956f9e0f929778139ffc
|
4
|
+
data.tar.gz: aedba4dfc194dad920ca0cc8c2688cdab598545130fee9bf0500ecebee042413
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2351e57e9372d5bb5623e8b6b8bd9152754fab12a6489c1a0e837eeff4c9a96091b1c1a57f25d810da562eafd15790b27eab59657062fcfb7aa3e6dbb3809ad6
|
7
|
+
data.tar.gz: cac4119ca9883a44132b4d7af6a01f845f5162fcbd27c3f0c212092307a47a053586f9a3b1392dd5f91479641ea9f7d648de06b4244ff46884da85f40f21eed0
|
@@ -83,7 +83,8 @@ class DiscoveredHostsController < ::ApplicationController
|
|
83
83
|
::ForemanDiscovery::HostConverter.set_build_clean_facts(host)
|
84
84
|
::ForemanDiscovery::HostConverter.unused_ip_for_host(host)
|
85
85
|
if host.save
|
86
|
-
|
86
|
+
host_path = Setting['host_details_ui'] ? host_details_page_path(host) : host_path(host)
|
87
|
+
success_options = { :success_redirect => host_path, :redirect_xhr => request.xhr? }
|
87
88
|
success_options[:success_msg] = success_message if success_message
|
88
89
|
process_success success_options
|
89
90
|
else
|
data/lib/discovery.rake
CHANGED
@@ -19,7 +19,8 @@ end
|
|
19
19
|
|
20
20
|
load 'tasks/jenkins.rake'
|
21
21
|
if Rake::Task.task_defined?(:'jenkins:unit')
|
22
|
-
|
22
|
+
# The "unit" tests also include system tests
|
23
|
+
Rake::Task["jenkins:unit"].enhance(['webpack:compile']) do
|
23
24
|
Rake::Task['test:discovery'].invoke
|
24
25
|
end
|
25
26
|
end
|
@@ -101,7 +101,7 @@ class DiscoveredHostsControllerTest < ActionController::TestCase
|
|
101
101
|
|
102
102
|
managed_host = Host.find(host.id)
|
103
103
|
assert managed_host.build
|
104
|
-
assert_redirected_to
|
104
|
+
assert_redirected_to host_details_page_path(managed_host)
|
105
105
|
assert_equal hostgroup.id, managed_host.hostgroup_id
|
106
106
|
assert_match(/Successfully/, flash[:success])
|
107
107
|
end
|
@@ -3,12 +3,6 @@ require_relative '../test_plugin_helper'
|
|
3
3
|
class DiscoveryRulesControllerTest < ActionController::TestCase
|
4
4
|
setup :initialize_host
|
5
5
|
|
6
|
-
test "should add a link to navigation" do
|
7
|
-
get :index, params: {}, session: set_session_user
|
8
|
-
assert_response :success
|
9
|
-
assert response.body =~ /\/discovery_rules/
|
10
|
-
end
|
11
|
-
|
12
6
|
test "reader role should get index" do
|
13
7
|
get :index, params: {}, session: set_session_user_default_reader
|
14
8
|
assert_response :success
|
@@ -271,7 +271,8 @@ class HostDiscoveredTest < ActiveSupport::TestCase
|
|
271
271
|
@facts["productname"] = "Dishwasher DW400"
|
272
272
|
host2 = discover_host_from_facts(@facts)
|
273
273
|
assert_equal 'mace41f13cc3658', host2.name
|
274
|
-
|
274
|
+
# Bypass fact cache by using it as a method
|
275
|
+
assert_equal 'Dishwasher DW400', host2.facts('productname')['productname']
|
275
276
|
assert_equal '10.35.27.2', host2.ip
|
276
277
|
assert_equal 1, Host::Discovered.where(:name => 'mace41f13cc3658').count
|
277
278
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_discovery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 23.0.
|
4
|
+
version: 23.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aditi Puntambekar
|
@@ -76,7 +76,7 @@ authors:
|
|
76
76
|
autorequire:
|
77
77
|
bindir: bin
|
78
78
|
cert_chain: []
|
79
|
-
date:
|
79
|
+
date: 2024-01-25 00:00:00.000000000 Z
|
80
80
|
dependencies: []
|
81
81
|
description: MaaS Discovery Plugin engine for Foreman
|
82
82
|
email: gsutclif@redhat.com
|
@@ -295,6 +295,7 @@ files:
|
|
295
295
|
- test/functional/discovery_rules_controller_test.rb
|
296
296
|
- test/functional/foreman_discovery/concerns/hosts_controller_extensions_test.rb
|
297
297
|
- test/integration/discovered_hosts_test.rb
|
298
|
+
- test/integration/menu_test.rb
|
298
299
|
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb
|
299
300
|
- test/migrations/20221102075151_migrate_discovery_hostname_and_fact_column_to_array_test.rb.orig
|
300
301
|
- test/static_fixtures/redhat_kexec.erb
|
@@ -380,6 +381,7 @@ test_files:
|
|
380
381
|
- test/functional/discovered_hosts_controller_test.rb
|
381
382
|
- test/functional/discovery_rules_controller_test.rb
|
382
383
|
- test/integration/discovered_hosts_test.rb
|
384
|
+
- test/integration/menu_test.rb
|
383
385
|
- test/unit/ui_notifications/destroy_host_test.rb
|
384
386
|
- test/unit/ui_notifications/new_host_test.rb
|
385
387
|
- test/unit/discovered_mailer_test.rb
|