From 5fbd43d5a948ac7773955a26c1d0cb0db42252d9 Mon Sep 17 00:00:00 2001 From: varac Date: Tue, 6 Sep 2016 13:59:05 +0200 Subject: git subrepo clone https://github.com/pixelated/puppet-pixelated.git files/puppet/modules/pixelated subrepo: subdir: "files/puppet/modules/pixelated" merged: "6086b94" upstream: origin: "https://github.com/pixelated/puppet-pixelated.git" branch: "master" commit: "6086b94" git-subrepo: version: "0.3.0" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "1e79595" --- .../modules/pixelated/spec/classes/tests_spec.rb | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 files/puppet/modules/pixelated/spec/classes/tests_spec.rb (limited to 'files/puppet/modules/pixelated/spec/classes/tests_spec.rb') diff --git a/files/puppet/modules/pixelated/spec/classes/tests_spec.rb b/files/puppet/modules/pixelated/spec/classes/tests_spec.rb new file mode 100644 index 0000000..eaf347c --- /dev/null +++ b/files/puppet/modules/pixelated/spec/classes/tests_spec.rb @@ -0,0 +1,50 @@ +require 'spec_helper' + +describe 'pixelated::tests' do + context 'single node' do + let(:facts) do + { + :operatingsystem => 'Debian', + :osfamily => 'Debian', + :lsbdistid => 'Debian', + :lsbdistcodename => 'jessie', + :testscenario => 'single_node', + } + end + + let!(:ensure_packages) { MockFunction.new('ensure_packages',{:type => :statement}) } + let(:pre_condition) { [ + "class stdlib {}", + ] } + + + it do + should contain_file('/srv/leap/tests_custom').with( + 'ensure' => 'directory', + 'mode' => '0755', + ) + end + it do + should contain_file('/srv/leap/tests_custom/functional-tests').with( + 'ensure' => 'directory', + 'recurse' => 'true', + ) + end + + + + it { should contain_file('/srv/leap/tests_custom/pixelated.rb')} + it { should contain_file('/usr/local/bin/phantomjs')} + + it do + should contain_exec('dummy_register_job').with( + "require" => "Class[::Check_mk::Agent::Install]" + ) + end + it do + should contain_cron('run_functional_tests').with( + "command" => """(date; INVITE_CODE_ENABLED=true /usr/bin/mk-job pixelated-functional-tests /usr/local/bin/behave --tags @staging --tags ~@wip --no-capture -k /srv/leap/tests_custom/functional-tests/) >> /var/log/check_mk_jobs.log 2>&1" + ) + end + end +end -- cgit v1.2.3