foreman_remote_execution 1.6.3 → 1.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/foreman_remote_execution/template_input.js +0 -10
- data/app/assets/javascripts/foreman_remote_execution/template_invocation.js +1 -12
- data/app/assets/stylesheets/foreman_remote_execution/template_invocation.css.scss +1 -0
- data/app/controllers/api/v2/job_invocations_controller.rb +5 -1
- data/app/helpers/job_invocation_output_helper.rb +5 -4
- data/app/helpers/job_invocations_helper.rb +0 -29
- data/app/helpers/remote_execution_helper.rb +1 -24
- data/app/lib/foreman_remote_execution/renderer/scope/input.rb +28 -8
- data/app/models/concerns/foreman_remote_execution/template_extensions.rb +0 -12
- data/app/models/concerns/foreman_remote_execution/template_input_extensions.rb +9 -0
- data/app/models/concerns/foreman_remote_execution/template_overrides.rb +11 -0
- data/app/models/input_template_renderer.rb +16 -17
- data/app/models/job_invocation.rb +14 -4
- data/app/models/job_invocation_composer.rb +2 -6
- data/app/models/job_template.rb +23 -52
- data/app/models/template_invocation_input_value.rb +12 -1
- data/app/views/api/v2/smart_proxies/pubkey.json.rabl +1 -0
- data/app/views/job_invocations/_form.html.erb +1 -7
- data/app/views/job_templates/_custom_tabs.html.erb +0 -7
- data/app/views/template_invocations/_output_line_set.html.erb +2 -2
- data/app/views/templates/ssh/module_action.erb +67 -0
- data/app/views/templates/ssh/package_action.erb +39 -7
- data/app/views/templates/ssh/power_action.erb +2 -1
- data/app/views/templates/ssh/puppet_run_once.erb +1 -0
- data/app/views/templates/ssh/run_command.erb +1 -0
- data/app/views/templates/ssh/service_action.erb +9 -1
- data/config/routes.rb +0 -1
- data/lib/foreman_remote_execution/engine.rb +4 -0
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/locale/de/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/de/foreman_remote_execution.po +3 -72
- data/locale/en/foreman_remote_execution.po +3 -72
- data/locale/en_GB/foreman_remote_execution.po +3 -72
- data/locale/es/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/es/foreman_remote_execution.po +3 -72
- data/locale/foreman_remote_execution.pot +124 -225
- data/locale/fr/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/fr/foreman_remote_execution.po +3 -72
- data/locale/ja/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ja/foreman_remote_execution.po +3 -72
- data/locale/ko/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ko/foreman_remote_execution.po +3 -72
- data/locale/pt_BR/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/pt_BR/foreman_remote_execution.po +3 -72
- data/locale/ru/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/ru/foreman_remote_execution.po +3 -72
- data/locale/zh_CN/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_CN/foreman_remote_execution.po +3 -72
- data/locale/zh_TW/LC_MESSAGES/foreman_remote_execution.mo +0 -0
- data/locale/zh_TW/foreman_remote_execution.po +3 -72
- data/test/factories/foreman_remote_execution_factories.rb +6 -5
- data/test/functional/api/v2/job_invocations_controller_test.rb +10 -0
- data/test/unit/input_template_renderer_test.rb +52 -21
- data/test/unit/job_invocation_composer_test.rb +2 -2
- data/test/unit/job_invocation_test.rb +36 -0
- metadata +6 -19
- data/app/controllers/api/v2/template_inputs_controller.rb +0 -92
- data/app/controllers/concerns/foreman/controller/parameters/template_input.rb +0 -17
- data/app/models/template_input.rb +0 -179
- data/app/views/api/v2/template_inputs/base.json.rabl +0 -3
- data/app/views/api/v2/template_inputs/create.json.rabl +0 -3
- data/app/views/api/v2/template_inputs/index.json.rabl +0 -3
- data/app/views/api/v2/template_inputs/main.json.rabl +0 -10
- data/app/views/api/v2/template_inputs/show.json.rabl +0 -3
- data/app/views/template_inputs/_form.html.erb +0 -25
- data/app/views/template_inputs/_invocation_form.html.erb +0 -7
- data/db/migrate/20150616080015_create_template_input.rb +0 -19
- data/db/migrate/20150827152730_add_options_to_template_input.rb +0 -5
- data/db/migrate/20160127134031_add_advanced_to_template_input.rb +0 -11
- data/test/functional/api/v2/template_inputs_controller_test.rb +0 -56
- data/test/unit/template_input_test.rb +0 -40
@@ -1,40 +0,0 @@
|
|
1
|
-
require 'test_plugin_helper'
|
2
|
-
|
3
|
-
class TemplateInputTest < ActiveSupport::TestCase
|
4
|
-
let(:template_input) { FactoryBot.build(:template_input) }
|
5
|
-
|
6
|
-
context 'export' do
|
7
|
-
before do
|
8
|
-
template_input.input_type = 'user'
|
9
|
-
template_input.options = "foo\nbar\nbaz"
|
10
|
-
end
|
11
|
-
|
12
|
-
it 'exports type' do
|
13
|
-
template_input.to_export['input_type'].must_equal template_input.input_type
|
14
|
-
end
|
15
|
-
|
16
|
-
it 'exports options' do
|
17
|
-
template_input.to_export['options'].must_equal template_input.options
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
context 'user input' do
|
22
|
-
before { template_input.input_type = 'user' }
|
23
|
-
it { assert template_input.user_template_input? }
|
24
|
-
end
|
25
|
-
|
26
|
-
context 'fact input' do
|
27
|
-
before { template_input.input_type = 'fact' }
|
28
|
-
it { assert template_input.fact_template_input? }
|
29
|
-
end
|
30
|
-
|
31
|
-
context 'variable input' do
|
32
|
-
before { template_input.input_type = 'variable' }
|
33
|
-
it { assert template_input.variable_template_input? }
|
34
|
-
end
|
35
|
-
|
36
|
-
context 'puppet parameter input' do
|
37
|
-
before { template_input.input_type = 'puppet_parameter' }
|
38
|
-
it { assert template_input.puppet_parameter_template_input? }
|
39
|
-
end
|
40
|
-
end
|