diff --git a/README.md b/README.md index 75efc2a..8356f1d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ On your workstation, execute the following command in your terminal: ```ssh bundle install ``` +Also make sure to share your public ssh key to target machine: +``` +ssh-copy-id root@ +``` ## Running Tests To run all tests, use the following command: diff --git a/spec/configuration/chef_spec.rb b/spec/configuration/chef_spec.rb new file mode 100644 index 0000000..c63cc42 --- /dev/null +++ b/spec/configuration/chef_spec.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +require 'spec_helper' +set :os, family: 'redhat', release: '9', arch: 'x86_64' + +describe file('/usr/lib/redborder/bin/rb_wakeup_chef.sh'), :rb_wakeup_chef do + it { should exist } + it { should be_file } + it { should be_executable.by_user('webui') } +end + +describe 'Checking WakeUpClusterJob' do + query_psql = "echo \"SELECT * FROM stored_delayed_jobs WHERE job='RbWakeupChefClusterJob';\" | rb_psql redborder" + describe command(query_psql) do + its(:exit_status) { should eq 0 } + its(:stdout) { should_not match(/Errno::EACCES: Permission denied/) } + end +end