foreman_acd 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/ui_acd_controller.rb +1 -1
- data/lib/foreman_acd/version.rb +1 -1
- data/test/controllers/app_definitions_controller_test.rb +5 -3
- data/test/controllers/app_instances_controller_test.rb +5 -3
- data/test/controllers/ui_acd_controller_test.rb +4 -2
- data/test/factories/foreman_acd_factories.rb +5 -5
- data/test/models/app_definition_test.rb +2 -1
- data/test/models/app_instance_test.rb +2 -0
- metadata +1 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91ccbadf60d3e30953d20270ca7a5b631f3c9961d4fb968ee5b6e6b1878da3c1
|
4
|
+
data.tar.gz: 072b5c71e1d7697e15049c01f8fa937d841be0ed968f76f36b0a40cd8368a1ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4aea1cd1dfd9101fa1278f7252282a84692f33961d0058e7254022f936562c1cdfdf2b6a853466e13e8f04cd878bff0f1a85f9bf29b96936b2c3af88cbe4fc25
|
7
|
+
data.tar.gz: effc1cf35ed06a1fc72ef0d39f8fa140eb9e037147e7f07544bb1e7c5e99c7c8a88b1fbe529e8a802a054f24253aa901c6ca6f3f66940698c759f0efb2a6b7c0
|
data/lib/foreman_acd/version.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'test_plugin_helper'
|
2
4
|
require 'nokogiri'
|
3
5
|
|
@@ -14,9 +16,9 @@ module ForemanAcd
|
|
14
16
|
|
15
17
|
test 'should destroy app definition' do
|
16
18
|
assert_difference('AppDefinition.count', -1) do
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
delete :destroy,
|
20
|
+
:params => { :id => @model.id },
|
21
|
+
:session => set_session_user
|
20
22
|
end
|
21
23
|
assert_redirected_to app_definitions_url
|
22
24
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'test_plugin_helper'
|
2
4
|
require 'nokogiri'
|
3
5
|
|
@@ -14,9 +16,9 @@ module ForemanAcd
|
|
14
16
|
|
15
17
|
test 'should destroy app instance' do
|
16
18
|
assert_difference('AppInstance.count', -1) do
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
delete :destroy,
|
20
|
+
:params => { :id => @model.id },
|
21
|
+
:session => set_session_user
|
20
22
|
end
|
21
23
|
assert_redirected_to app_instances_url
|
22
24
|
end
|
@@ -1,10 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'test_plugin_helper'
|
2
4
|
require 'nokogiri'
|
3
5
|
|
4
6
|
class UiAcdControllerTest < ActionController::TestCase
|
5
7
|
test 'get app json' do
|
6
8
|
app_def = FactoryBot.create(:app_definition)
|
7
|
-
get :app, params
|
9
|
+
get :app, :params => { :id => app_def.id }, :session => set_session_user
|
8
10
|
assert_response :success
|
9
11
|
|
10
12
|
assert_equal app_def.name, json_response['app_definition']['name']
|
@@ -16,7 +18,7 @@ class UiAcdControllerTest < ActionController::TestCase
|
|
16
18
|
|
17
19
|
test 'get fdata json' do
|
18
20
|
hostgroup = FactoryBot.create(:hostgroup, :with_domain, :with_os, :with_environment)
|
19
|
-
get :fdata, params
|
21
|
+
get :fdata, :params => { :id => hostgroup.id }, :session => set_session_user
|
20
22
|
assert_response :success
|
21
23
|
|
22
24
|
assert_equal hostgroup.environment.name, json_response['environments'][0]['name']
|
@@ -3,15 +3,15 @@
|
|
3
3
|
FactoryBot.define do
|
4
4
|
factory :app_definition, :class => 'ForemanAcd::AppDefinition' do
|
5
5
|
sequence(:name) { |n| "app_definition#{n}" }
|
6
|
-
sequence(:description) {|n| "description#{n}" }
|
7
|
-
hostgroup { FactoryBot.create(:hostgroup, :with_domain, :with_os, :with_environment
|
8
|
-
parameters {
|
6
|
+
sequence(:description) { |n| "description#{n}" }
|
7
|
+
hostgroup { FactoryBot.create(:hostgroup, :with_domain, :with_os, :with_environment) }
|
8
|
+
parameters { '[{"id":0,"name":"Hostname","description":"","type":"hostname","value":"mysqllinux"},{"id":1,"name":"RootPW","description":"","type":"password","value":"sesam12345"},{"id":2,"name":"ansible_root","description":"","type":"hostparam","value":"/root/ansible"}]' }
|
9
9
|
end
|
10
10
|
|
11
11
|
factory :app_instance, :class => 'ForemanAcd::AppInstance' do
|
12
12
|
sequence(:name) { |n| "app_instance#{n}" }
|
13
13
|
app_definition { FactoryBot.create(:app_definition) }
|
14
|
-
sequence(:description) {|n| "description#{n}" }
|
15
|
-
parameters {
|
14
|
+
sequence(:description) { |n| "description#{n}" }
|
15
|
+
parameters { '[{"id":0,"name":"Hostname","description":"","type":"hostname","value":"mysqllinux"},{"id":1,"name":"RootPW","description":"","type":"password","value":"sesam12345"},{"id":2,"name":"ansible_root","description":"","type":"hostparam","value":"/root/ansible"}]' }
|
16
16
|
end
|
17
17
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'test_plugin_helper'
|
2
4
|
|
3
5
|
module ForemanAcd
|
@@ -6,6 +8,5 @@ module ForemanAcd
|
|
6
8
|
should validate_uniqueness_of(:name)
|
7
9
|
should belong_to(:hostgroup)
|
8
10
|
should have_many(:app_instances).dependent(:destroy)
|
9
|
-
|
10
11
|
end
|
11
12
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_acd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ATIX AG
|
@@ -66,34 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 2.0.1
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: foreman-tasks
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0.10'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0.10'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rails
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - "~>"
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '5.1'
|
90
|
-
type: :runtime
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - "~>"
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '5.1'
|
97
69
|
description: Application Centric Deployment.
|
98
70
|
email:
|
99
71
|
- info@atix.de
|