Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions spec/configuration/barnyard2_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@
instances_group = %w[0] # This is the default name of the first instances group

describe 'Barnyard2 config' do
instances_group.each do |group|
describe file("/etc/snort/#{group}/barnyard2.conf") do
it { should exist }
it { should be_file }
it { should be_readable }
file_path = '/etc/snort/0/barnyard2.conf'
if File.exist?(file_path)
skip("File #{file_path} does not exist, but is expected to exist on running state")
else
instances_group.each do |group|
file_path = "/etc/snort/#{group}/barnyard2.conf"
describe file(file_path) do
it { should exist }
it { should be_file }
it { should be_readable }
end
end
end
end
11 changes: 11 additions & 0 deletions spec/configuration/users_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

require 'set'
require 'spec_helper'
set :os, family: 'redhat', release: '9', arch: 'x86_64'

# TODO: Change it to 'redborder'
describe user('redBorder') do
it { should exist }
it { should have_login_shell '/bin/bash' }
end