Update tests

This commit is contained in:
James Barnett 2017-09-01 12:33:36 -05:00
parent c74a74bbef
commit b1b50a6872

View File

@ -6,7 +6,7 @@ require '../helpers/chat_test.rb'
describe file('/home/artoo_detoo/music/10_of_clubs.wav') do describe file('/home/artoo_detoo/music/10_of_clubs.wav') do
it { should be_file } it { should be_file }
it { should be_owned_by 'artoo_detoo' } it { should be_owned_by 'artoo_detoo' }
its('mode') { should cmp '0400' } its('mode') { should cmp '0410' }
its('md5sum') { should eq '5b97f084aa90c4b9504725519cf5204e' } its('md5sum') { should eq '5b97f084aa90c4b9504725519cf5204e' }
end end
@ -33,14 +33,14 @@ end
# NOTE: The chatbot can get a little laggy if there is a lot of data in the log. # NOTE: The chatbot can get a little laggy if there is a lot of data in the log.
# This can cause this test to fail incorrectly. # This can cause this test to fail incorrectly.
# To remedy, clear the /var/www/log.html file on metasploitable and restart the chatbot service. # To remedy, clear the /var/www/log.html file on metasploitable and restart the chatbot service.
# describe 'ace_of_clubs' do describe 'ace_of_clubs' do
# let(:host_ip) { command("ip addr | grep 'state UP' -A2 | grep 'eth0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/'").stdout.strip } let(:host_ip) { command("ip addr | grep 'state UP' -A2 | grep 'eth0' | tail -n1 | awk '{print $2}' | cut -f1 -d'/'").stdout.strip }
#
# it 'should print out the correct base64 flag' do it 'should print out the correct base64 flag' do
# ct = ChatTest.new(host_ip) ct = ChatTest.new(host_ip)
# expect(ct.check_chat_bot).to eq true #TODO: Make this output more meaningful. e.g. output what was returned and what was expected. expect(ct.check_chat_bot).to eq true #TODO: Make this output more meaningful. e.g. output what was returned and what was expected.
# end end
# end end
# Tests for "Hard mode" flags # Tests for "Hard mode" flags
if ENV['MS3_LINUX_HARD'] if ENV['MS3_LINUX_HARD']
@ -119,7 +119,7 @@ else
# 9 of Diamonds tests # 9 of Diamonds tests
describe file('/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso') do describe file('/home/kylo_ren/.secret_files/my_recordings_do_not_open.iso') do
it { should be_file } it { should be_file }
its('mode') { should cmp '0600' } its('mode') { should cmp '0610' }
its('owner') { should eq 'kylo_ren' } its('owner') { should eq 'kylo_ren' }
its('group') { should eq 'users' } its('group') { should eq 'users' }
end end