foreman_openscap 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/compliance/policies_controller.rb +53 -0
- data/app/models/concerns/foreman_openscap/host_extensions.rb +1 -1
- data/app/models/concerns/foreman_openscap/policy_extensions.rb +1 -0
- data/app/views/dashboard/_foreman_openscap_host_reports_widget.html.erb +1 -1
- data/app/views/scaptimony_arf_reports/_list.html.erb +1 -1
- data/config/routes.rb +2 -0
- data/lib/foreman_openscap/version.rb +1 -1
- data/test/factories/foreman_openscap_factories.rb +5 -5
- data/test/factories/policy_factory.rb +12 -0
- data/test/factories/scap_content_related.rb +16 -0
- data/test/files/scap_contents/ssg-fedora-ds.xml +5647 -0
- data/test/functional/api/v2/compliance/policies_controller_test.rb +14 -0
- metadata +11 -2
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_plugin_helper'
|
2
|
+
|
3
|
+
class Api::V2::Compliance::PoliciesControllerTest < ActionController::TestCase
|
4
|
+
setup do
|
5
|
+
Scaptimony::Policy.any_instance.stubs(:ensure_needed_puppetclasses).returns(true)
|
6
|
+
end
|
7
|
+
|
8
|
+
test "should return xml of scap content" do
|
9
|
+
policy = FactoryGirl.create(:policy)
|
10
|
+
get :content, { :id => policy.id }, set_session_user
|
11
|
+
assert(@response.header['Content-Type'], 'application/xml')
|
12
|
+
assert_response :success
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_openscap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Šimon Lukašík"
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -52,6 +52,7 @@ files:
|
|
52
52
|
- app/assets/javascript/foreman_openscap/policy_edit.js
|
53
53
|
- app/assets/stylesheets/foreman_openscap/policy.css.scss
|
54
54
|
- app/controllers/api/v2/compliance/arf_reports_controller.rb
|
55
|
+
- app/controllers/api/v2/compliance/policies_controller.rb
|
55
56
|
- app/controllers/scaptimony_arf_reports_controller.rb
|
56
57
|
- app/controllers/scaptimony_dashboard_controller.rb
|
57
58
|
- app/controllers/scaptimony_policies_controller.rb
|
@@ -114,6 +115,10 @@ files:
|
|
114
115
|
- lib/foreman_openscap/version.rb
|
115
116
|
- lib/tasks/foreman_openscap_tasks.rake
|
116
117
|
- test/factories/foreman_openscap_factories.rb
|
118
|
+
- test/factories/policy_factory.rb
|
119
|
+
- test/factories/scap_content_related.rb
|
120
|
+
- test/files/scap_contents/ssg-fedora-ds.xml
|
121
|
+
- test/functional/api/v2/compliance/policies_controller_test.rb
|
117
122
|
- test/test_plugin_helper.rb
|
118
123
|
- test/unit/openscap_host_test.rb
|
119
124
|
homepage: https://github.com/OpenSCAP/foreman_openscap
|
@@ -143,5 +148,9 @@ summary: Foreman plug-in for displaying OpenSCAP audit reports
|
|
143
148
|
test_files:
|
144
149
|
- test/unit/openscap_host_test.rb
|
145
150
|
- test/test_plugin_helper.rb
|
151
|
+
- test/files/scap_contents/ssg-fedora-ds.xml
|
152
|
+
- test/functional/api/v2/compliance/policies_controller_test.rb
|
153
|
+
- test/factories/policy_factory.rb
|
154
|
+
- test/factories/scap_content_related.rb
|
146
155
|
- test/factories/foreman_openscap_factories.rb
|
147
156
|
has_rdoc:
|