Skip to content

Commit

Permalink
Bugfix/#16981 wakeup chef script status (#71)
Browse files Browse the repository at this point in the history
rb_wakeup_chef test by @ljblancoredborder
  • Loading branch information
ljblancoredborder authored Jun 13, 2024
1 parent 0527951 commit 6af0190
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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@<target_ip>
```

## Running Tests
To run all tests, use the following command:
Expand Down
18 changes: 18 additions & 0 deletions spec/configuration/chef_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 6af0190

Please sign in to comment.