Skip to content

Commit 67df325

Browse files
committed
Move Policy/PolicyModel test to separate file.
1 parent 6e27266 commit 67df325

File tree

2 files changed

+27
-8
lines changed

2 files changed

+27
-8
lines changed

test/xccdf/benchmark_test.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2014 Red Hat Inc.
2+
# Copyright (c) 2014--2016 Red Hat Inc.
33
#
44
# This software is licensed to you under the GNU General Public License,
55
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
@@ -14,7 +14,6 @@
1414
require 'openscap/ds/sds'
1515
require 'openscap/source'
1616
require 'openscap/xccdf/benchmark'
17-
require 'openscap/xccdf/policy_model'
1817

1918
class TestBenchmark < OpenSCAP::TestCase
2019
def test_new_from_file
@@ -113,12 +112,6 @@ def test_items_fixes
113112
b.destroy
114113
end
115114

116-
def test_policy_model_creation
117-
b = benchmark_from_file
118-
pm = OpenSCAP::Xccdf::PolicyModel.new b
119-
pm.destroy
120-
end
121-
122115
private
123116

124117
def benchmark_from_file

test/xccdf/policy_test.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#
2+
# Copyright (c) 2016 Red Hat Inc.
3+
#
4+
# This software is licensed to you under the GNU General Public License,
5+
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
6+
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
7+
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
8+
# along with this software; if not, see
9+
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
10+
#
11+
12+
require 'common/testcase'
13+
require 'openscap'
14+
require 'openscap/source'
15+
require 'openscap/xccdf/benchmark'
16+
require 'openscap/xccdf/policy'
17+
require 'openscap/xccdf/policy_model'
18+
19+
class TestPolicy < OpenSCAP::TestCase
20+
def test_new_policy_model
21+
@s = OpenSCAP::Source.new '../data/xccdf.xml'
22+
b = OpenSCAP::Xccdf::Benchmark.new @s
23+
pm = OpenSCAP::Xccdf::PolicyModel.new b
24+
pm.destroy
25+
end
26+
end

0 commit comments

Comments
 (0)