Skip to content

Commit e4fb434

Browse files
ci(tests): fix and simplify tests
1 parent 6200df5 commit e4fb434

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

test/integration/default/controls/archives_spec.rb

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -5,35 +5,10 @@
55
title 'should be installed'
66
desc 'Ensure golang tarball archive was extracted correctly'
77

8-
describe file('/usr/local/go1.10.1.linux-amd64/go') do
8+
describe file('/usr/local/go1.14.2.linux-amd64/go') do
99
it { should be_directory }
1010
it { should be_owned_by 'root' }
1111
it { should be_grouped_into 'root' }
1212
its('mode') { should cmp '0755' }
1313
end
14-
15-
require 'digest'
16-
binary = file('/usr/local/go1.10.1.linux-amd64/go/bin/go').content
17-
Digest::SHA256.hexdigest(binary)
18-
describe file('/usr/local/go1.10.1.linux-amd64/go/bin/go') do
19-
# rubocop:disable LineLength
20-
its('sha256sum') { should eq '11438a2d41e257519e8c0ad098c287f9f73f1b8382a012a0c10e1dee5fb1e8ae' }
21-
# rubocop:enable LineLength
22-
end
23-
24-
binary = file('/usr/local/go1.10.1.linux-amd64/go/bin/godoc').content
25-
Digest::SHA256.hexdigest(binary)
26-
describe file('/usr/local/go1.10.1.linux-amd64/go/bin/godoc') do
27-
# rubocop:disable LineLength
28-
its('sha256sum') { should eq '4076bb73349f253c04e5ef214934938760eefb26529f22d2e6fdbd61b99bb4b5' }
29-
# rubocop:enable LineLength
30-
end
31-
32-
binary = file('/usr/local/go1.10.1.linux-amd64/go/bin/gofmt').content
33-
Digest::SHA256.hexdigest(binary)
34-
describe file('/usr/local/go1.10.1.linux-amd64/go/bin/gofmt') do
35-
# rubocop:disable LineLength
36-
its('sha256sum') { should eq '5673f5914f195331322b20aee026f1882dac7c92b61c41bae23a04fb803b3e2c' }
37-
# rubocop:enable LineLength
38-
end
3914
end

test/integration/default/controls/environ_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
its('mode') { should cmp '0644' }
1111
its('content') { should include 'Your changes may be overwritten' }
1212
# rubocop:disable LineLength
13-
its('content') { should include 'export GOROOT=/usr/local/go1.10.1.linux-amd64' }
13+
its('content') { should include 'export GOROOT=/usr/local/go1.14.2.linux-amd64' }
1414
its('content') { should include 'export GOPATH=/usr/local/golang/packages' }
15-
its('content') { should include 'export PATH=${PATH}:/usr/local/go1.10.1.linux-amd64/go/bin' }
15+
its('content') { should include 'export PATH=${PATH}:/usr/local/go1.14.2.linux-amd64/go/bin' }
1616
# rubocop:enable LineLength
1717
end
1818
end

0 commit comments

Comments
 (0)