Skip to content

Commit

Permalink
test(rubo): fix some lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
noelmcloughlin committed Jan 25, 2020
1 parent 6d3286d commit a0c49f3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion golang/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ golang:

cmd:
goget: []
clean: []
clean: []
20 changes: 12 additions & 8 deletions test/integration/default/controls/archives_spec.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
title 'archives profile'

control 'golang tarball archive' do
# frozen_string_literal: true
control 'golang tar archive' do
impact 1.0
title 'should be installed'
desc "Ensure golang tarball archive was extracted correctly"
tag package: "tarball archive"
desc 'Ensure golang tarball archive was extracted correctly'
tag package: 'tarball archive'

describe file('/usr/local/go1.10.1.linux-amd64/go') do # another test
describe file('/usr/local/go1.10.1.linux-amd64/go') do
it { should be_directory }
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
Expand All @@ -17,20 +16,25 @@
binary = file('/usr/local/go1.10.1.linux-amd64/go/bin/go').content
sha256sum = Digest::SHA256.hexdigest(binary)
describe file('/usr/local/go1.10.1.linux-amd64/go/bin/go') do
# rubocop:disable LineLength
its('sha256sum') { should eq '11438a2d41e257519e8c0ad098c287f9f73f1b8382a012a0c10e1dee5fb1e8ae' }
# rubocop:enable LineLength
end

binary = file('/usr/local/go1.10.1.linux-amd64/go/bin/godoc').content
sha256sum = Digest::SHA256.hexdigest(binary)
describe file('/usr/local/go1.10.1.linux-amd64/go/bin/godoc') do
# rubocop:disable LineLength
its('sha256sum') { should eq '4076bb73349f253c04e5ef214934938760eefb26529f22d2e6fdbd61b99bb4b5' }
# rubocop:enable LineLength
end


binary = file('/usr/local/go1.10.1.linux-amd64/go/bin/gofmt').content
sha256sum = Digest::SHA256.hexdigest(binary)
describe file('/usr/local/go1.10.1.linux-amd64/go/bin/gofmt') do
its('sha256sum') { should eq '5673f5914f195331322b20aee026f1882dac7c92b61c41bae23a04fb803b3e2c' }
# rubocop:disable LineLength
its('sha256sum') { should eq '5673f5914f195331322b20aee026f1882dac7c92b61c41bae23a04fb803b3e2c'}
# rubocop:enable LineLength
end

end

0 comments on commit a0c49f3

Please sign in to comment.