66 class { 'one':
77 oned => true,
88 }
9- onetemplate { 'test-vm ':
9+ onetemplate { 'test-template ':
1010 ensure => absent,
1111 }
1212 EOS
1313 apply_manifest ( pp , :catch_failures => true )
1414 apply_manifest ( pp , :catch_changes => true )
1515 end
1616
17- describe 'when creating a template with deprecated properties' do
17+ after :all do
18+ pp = <<-EOS
19+ onetemplate { 'test-template':
20+ ensure => absent,
21+ }
22+ EOS
23+ apply_manifest ( pp , :catch_failures => true )
24+ apply_manifest ( pp , :catch_changes => true )
25+ end
26+
27+ describe 'when creating a template with default properties' do
1828 it 'should idempotently run' do
19- skip
2029 pp = <<-EOS
21- onetemplate { 'test-vm':
22- # Capacity
30+ onetemplate { 'test-template':
2331 cpu => 1,
2432 memory => 128,
25-
26- # OS
27- os_kernel => '/vmlinuz',
28- os_initrd => '/initrd.img',
29- os_root => 'sda1',
30- os_kernel_cmd => 'ro xencons=tty console=tty1',
31-
32- # Features
33- acpi => true,
34- pae => true,
35-
36- # Disks
37- disks => [ 'Data', 'Experiments', ],
38-
39- # Network
40- nics => [ 'Blue', 'Red', ],
41-
42- # I/O Devices
43- graphics_type => 'vnc',
44- graphics_listen => '0.0.0.0',
45- graphics_port => 5,
4633 }
4734 EOS
4835
@@ -51,24 +38,11 @@ class { 'one':
5138 end
5239 end
5340
54- describe 'when destroying a template' do
55- it 'should idempotently run' do
56- pp = <<-EOS
57- onetemplate { 'test-vm':
58- ensure => absent,
59- }
60- EOS
61-
62- apply_manifest ( pp , :catch_failures => true )
63- apply_manifest ( pp , :catch_changes => true )
64- end
65- end
66-
67- describe 'when creating a template' do
41+ describe 'when creating a template with custom properties' do
6842 it 'should idempotently run' do
6943 skip
7044 pp = <<-EOS
71- onetemplate { 'test-vm ':
45+ onetemplate { 'test-template ':
7246 # Capacity
7347 cpu => 1,
7448 memory => 128,
@@ -118,7 +92,7 @@ class { 'one':
11892 describe 'when destroying a template' do
11993 it 'should idempotently run' do
12094 pp = <<-EOS
121- onetemplate { 'test-vm ':
95+ onetemplate { 'test-template ':
12296 ensure => absent,
12397 }
12498 EOS
0 commit comments