Skip to content

Commit

Permalink
fix(rubocop): add fixes using rubocop --safe-auto-correct
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 23, 2019
1 parent 9aaec41 commit 94e8abe
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 42 deletions.
45 changes: 23 additions & 22 deletions test/integration/deb/controls/letsencrypt_spec.rb
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# frozen_string_literal: true

describe file('/opt/letsencrypt') do
it { should_not exist }
it { should_not exist }
end

describe file('/etc/letsencrypt/cli.ini') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'server = https://acme-staging.api.letsencrypt.org/directory' }
its('content') { should match 'authenticator = webroot' }
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'server = https://acme-staging.api.letsencrypt.org/directory' }
its('content') { should match 'authenticator = webroot' }
end


describe file('/usr/bin/letsencrypt') do
it { should be_symlink }
end
Expand All @@ -26,20 +27,20 @@
end

describe file('/etc/apt/preferences.d/letsencrypt-backports') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'Pin: release a=stretch-backports' }
its('content') { should match 'Pin-Priority: 640' }
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'Pin: release a=stretch-backports' }
its('content') { should match 'Pin-Priority: 640' }
end

describe file('/etc/apt/sources.list.d/letsencrypt-backports-binary.list') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'deb http://deb.debian.org/debian stretch-backports main' }
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'deb http://deb.debian.org/debian stretch-backports main' }
end
26 changes: 14 additions & 12 deletions test/integration/git/controls/letsencrypt_spec.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# frozen_string_literal: true

describe file('/opt/letsencrypt') do
it { should be_directory }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 25 }
it { should be_directory }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 25 }
end

describe file('/etc/letsencrypt/cli.ini') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'server = https://acme-staging.api.letsencrypt.org/directory' }
its('content') { should match 'authenticator = standalone' }
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
its('content') { should match 'server = https://acme-staging.api.letsencrypt.org/directory' }
its('content') { should match 'authenticator = standalone' }
end
17 changes: 9 additions & 8 deletions test/integration/rpm/controls/letsencrypt_spec.rb
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# frozen_string_literal: true

describe file('/opt/letsencrypt') do
it { should_not exist }
it { should_not exist }
end

describe file('/etc/letsencrypt/cli.ini') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }
it { should be_file }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
it { should be_readable }
its('size') { should be > 1 }

its('content') { should match 'server = https://acme-staging.api.letsencrypt.org/directory' }
its('content') { should match 'authenticator = webroot' }
its('content') { should match 'server = https://acme-staging.api.letsencrypt.org/directory' }
its('content') { should match 'authenticator = webroot' }
end

describe file('/usr/bin/letsencrypt') do
Expand Down

0 comments on commit 94e8abe

Please sign in to comment.