Skip to content

Commit

Permalink
Additional cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
silug committed Dec 17, 2024
1 parent ce964d2 commit c9b1420
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 42 deletions.
6 changes: 2 additions & 4 deletions spec/classes/client_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
require 'spec_helper'

describe 'vnc::client' do
on_supported_os.each do |os, facts|
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
facts
end
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
it { is_expected.to create_class('vnc::client') }
Expand Down
39 changes: 20 additions & 19 deletions spec/classes/server_spec.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
require 'spec_helper'

describe 'vnc::server' do
on_supported_os.each do |os, facts|
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
facts
end
let(:facts) { os_facts }

it { is_expected.to compile.with_all_deps }
it { is_expected.to create_class('vnc::server') }
Expand All @@ -14,25 +12,28 @@
it { is_expected.to contain_class('gdm') }

it do
is_expected.to create_vnc__server__create('vnc_standard').with({
'port' => 5901,
'geometry' => '1024x768',
'depth' => 16
})
is_expected.to create_vnc__server__create('vnc_standard')
.with(
'port' => 5901,
'geometry' => '1024x768',
'depth' => 16,
)
end
it do
is_expected.to create_vnc__server__create('vnc_lowres').with({
'port' => 5902,
'geometry' => '800x600',
'depth' => 16
})
is_expected.to create_vnc__server__create('vnc_lowres')
.with(
'port' => 5902,
'geometry' => '800x600',
'depth' => 16,
)
end
it do
is_expected.to create_vnc__server__create('vnc_highres').with({
'port' => 5903,
'geometry' => '1280x1024',
'depth' => 16
})
is_expected.to create_vnc__server__create('vnc_highres')
.with(
'port' => 5903,
'geometry' => '1280x1024',
'depth' => 16,
)
end

it { is_expected.to contain_package('tigervnc-server') }
Expand Down
37 changes: 18 additions & 19 deletions spec/defines/server_create_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@

describe 'vnc::server::create' do
context 'supported operating systems' do
on_supported_os.each do |os, facts|
on_supported_os.each do |os, os_facts|
context "on #{os}" do
let(:facts) do
facts
end
let(:facts) { os_facts }

let(:title) { 'awesome_vnc' }

Expand All @@ -17,21 +15,22 @@
it { is_expected.to contain_class('xinetd') }

it do
is_expected.to contain_xinetd__service('awesome_vnc').with({
'banner' => '/dev/null',
'flags' => ['REUSE', 'IPv4'],
'protocol' => 'tcp',
'socket_type' => 'stream',
'x_wait' => 'no',
'x_type' => 'UNLISTED',
'log_on_success' => ['HOST', 'PID', 'DURATION'],
'user' => 'nobody',
'server' => '/usr/bin/Xvnc',
'server_args' => '-inetd -localhost -audit 4 -s 15 -query localhost -NeverShared -once -SecurityTypes None -desktop awesome_vnc -geometry 1280x1024 -depth 16',
'disable' => 'no',
'trusted_nets' => ['127.0.0.1'],
'port' => 5900
})
is_expected.to contain_xinetd__service('awesome_vnc')
.with(
'banner' => '/dev/null',
'flags' => ['REUSE', 'IPv4'],
'protocol' => 'tcp',
'socket_type' => 'stream',
'x_wait' => 'no',
'x_type' => 'UNLISTED',
'log_on_success' => ['HOST', 'PID', 'DURATION'],
'user' => 'nobody',
'server' => '/usr/bin/Xvnc',
'server_args' => '-inetd -localhost -audit 4 -s 15 -query localhost -NeverShared -once -SecurityTypes None -desktop awesome_vnc -geometry 1280x1024 -depth 16',
'disable' => 'no',
'trusted_nets' => ['127.0.0.1'],
'port' => 5900,
)
end
end
end
Expand Down

0 comments on commit c9b1420

Please sign in to comment.