Procházet zdrojové kódy

Merge pull request #24 from n-rodriguez/fix/rubocop

style(rubocop): fix Rubocop offenses
tags/v0.5.7
Nicolas Rodriguez před 4 roky
rodič
revize
51c7635538
Žádný účet není propojen s e-mailovou adresou tvůrce revize
2 změnil soubory, kde provedl 15 přidání a 12 odebrání
  1. +13
    -12
      test/integration/default/controls/config_spec.rb
  2. +2
    -0
      test/integration/default/controls/package_spec.rb

+ 13
- 12
test/integration/default/controls/config_spec.rb Zobrazit soubor

@@ -1,5 +1,6 @@
control 'UFW configuration' do
# frozen_string_literal: true

control 'UFW configuration' do
title 'Test UFW configuration'

describe directory('/etc/ufw') do
@@ -13,56 +14,56 @@ control 'UFW configuration' do

describe command('ufw status verbose | grep Status') do
its('exit_status') { should eq 0 }
its('stdout') { should match /active/ }
its('stdout') { should match(/active/) }
end

describe command('ufw status verbose | grep Logging') do
its('exit_status') { should eq 0 }
its('stdout') { should match /low/ }
its('stdout') { should match(/low/) }
end

describe command('ufw status | grep MySQL') do
its('exit_status') { should eq 0 }
its('stdout') { should match /ALLOW/ }
its('stdout') { should match(/ALLOW/) }
end

describe command('ufw status | grep Postgresql') do
its('exit_status') { should eq 0 }
its('stdout') { should match /LIMIT/ }
its('stdout') { should match(/LIMIT/) }
end

describe command('ufw status | grep SSH223') do
its('exit_status') { should eq 0 }
its('stdout') { should match /DENY/ }
its('stdout') { should match(/DENY/) }
end

describe command('ufw status | grep 10.0.0.0') do
its('exit_status') { should eq 0 }
its('stdout') { should match /DENY/ }
its('stdout') { should match(/DENY/) }
end

describe command('ufw status | grep 22/tcp') do
its('exit_status') { should eq 0 }
its('stdout') { should match /LIMIT/ }
its('stdout') { should match(/LIMIT/) }
end

describe command('ufw status | grep 80/tcp') do
its('exit_status') { should eq 0 }
its('stdout') { should match /DENY/ }
its('stdout') { should match(/DENY/) }
end

describe command('ufw status | grep 443/tcp') do
its('exit_status') { should eq 0 }
its('stdout') { should match /ALLOW/ }
its('stdout') { should match(/ALLOW/) }
end

describe command('ufw status | grep 10.0.0.1') do
its('exit_status') { should eq 0 }
its('stdout') { should match /DENY/ }
its('stdout') { should match(/DENY/) }
end

describe command('ufw status | grep 10.0.0.2') do
its('exit_status') { should eq 0 }
its('stdout') { should match /DENY/ }
its('stdout') { should match(/DENY/) }
end
end

+ 2
- 0
test/integration/default/controls/package_spec.rb Zobrazit soubor

@@ -1,3 +1,5 @@
# frozen_string_literal: true

control 'UFW package' do
title 'should be installed'


Načítá se…
Zrušit
Uložit