Skip to content

Commit

Permalink
Add motd test
Browse files Browse the repository at this point in the history
  • Loading branch information
ViMesTor committed Jan 30, 2024
1 parent 56f4a0f commit a0fd5fe
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
9 changes: 1 addition & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,11 @@ namespace :spec do
t.pattern = 'spec/services/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end

desc 'run monitor tests'
RSpec::Core::RakeTask.new(:monitor_cluster) do |t|
puts "Running Monitor tests on #{host} ..."
t.pattern = 'spec/modules/monitor/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end

desc 'run configuration tests'
RSpec::Core::RakeTask.new(:configuration) do |t|
puts "Running configuration tests on #{host} ..."
t.pattern = 'spec/configuration/*_spec.rb'
t.rspec_opts = '--format documentation' # O "--format progress"
end
end
16 changes: 16 additions & 0 deletions spec/configuration/motd_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# frozen_string_literal: true

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

# Verificar que existe un script MOTD en el sistema
describe file('/usr/lib/redborder/bin/motd') do
it { should exist }
it { should be_executable }
end

# Verificar la existencia del archivo MOTD en /etc/motd y su contenido
describe file('/etc/motd') do
it { should exist }
its('content') { should match(/.*redborder-repo.*/) }
end

0 comments on commit a0fd5fe

Please sign in to comment.