diff --git a/spec/configuration/barnyard2_spec.rb b/spec/configuration/barnyard2_spec.rb index c008d30..6131b8d 100644 --- a/spec/configuration/barnyard2_spec.rb +++ b/spec/configuration/barnyard2_spec.rb @@ -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 diff --git a/spec/configuration/users_spec.rb b/spec/configuration/users_spec.rb new file mode 100644 index 0000000..6ac080d --- /dev/null +++ b/spec/configuration/users_spec.rb @@ -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