Skip to content

Commit d444c57

Browse files
authored
Update default Go version to 1.25.6 (#11)
1 parent cd79ce9 commit d444c57

File tree

4 files changed

+14
-35
lines changed

4 files changed

+14
-35
lines changed

README.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,30 +25,9 @@ Install Go
2525
Install specific version of Go
2626

2727
class { 'golang':
28-
version => '1.14',
28+
version => '1.24.12',
2929
}
3030

3131
## Reference
3232

3333
[http://treydock.github.io/puppet-module-golang/](http://treydock.github.io/puppet-module-golang/)
34-
35-
## Development
36-
37-
### Testing
38-
39-
Testing requires the following dependencies:
40-
41-
* rake
42-
* bundler
43-
44-
Install gem dependencies
45-
46-
bundle install
47-
48-
Run unit tests
49-
50-
bundle exec rake release_checks
51-
52-
If you have Docker installed you can run system tests
53-
54-
bundle exec rake beaker

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# @param bin_dir
1919
# The path to bin directory for go and gofmt symlinks
2020
class golang (
21-
String $version = '1.22.5',
21+
String $version = '1.25.6',
2222
String[1] $os = downcase($facts['kernel']),
2323
String[1] $arch = $facts['os']['architecture'],
2424
Stdlib::Absolutepath $download_dir = '/tmp',

spec/acceptance/class_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@
66
context 'with default parameters' do
77
it 'runs successfully' do
88
pp = <<-PP
9-
class { 'golang': version => '1.21.12' }
9+
class { 'golang': version => '1.24.12' }
1010
PP
1111

1212
apply_manifest(pp, catch_failures: true)
1313
apply_manifest(pp, catch_changes: true)
1414
end
1515

1616
describe command('/usr/bin/go version') do
17-
its(:stdout) { is_expected.to match %r{1.21} }
17+
its(:stdout) { is_expected.to match %r{1.24} }
1818
end
1919
end
2020

2121
context 'with go upgrade' do
2222
it 'runs successfully' do
2323
pp = <<-PP
24-
class { 'golang': version => '1.22.5' }
24+
class { 'golang': version => '1.25.6' }
2525
PP
2626

2727
apply_manifest(pp, catch_failures: true)
2828
apply_manifest(pp, catch_changes: true)
2929
end
3030

3131
describe command('/usr/bin/go version') do
32-
its(:stdout) { is_expected.to match %r{1.22} }
32+
its(:stdout) { is_expected.to match %r{1.25} }
3333
end
3434
end
3535
end

spec/classes/golang_spec.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
it { is_expected.to compile.with_all_deps }
1818

1919
it do
20-
is_expected.to contain_file('/opt/go-1.22.5').with(
20+
is_expected.to contain_file('/opt/go-1.25.6').with(
2121
ensure: 'directory',
2222
owner: 'root',
2323
group: 'root',
@@ -26,16 +26,16 @@
2626
end
2727

2828
it do
29-
is_expected.to contain_archive('/tmp/go1.22.5.linux-amd64.tar.gz').with(
30-
source: 'https://dl.google.com/go/go1.22.5.linux-amd64.tar.gz',
29+
is_expected.to contain_archive('/tmp/go1.25.6.linux-amd64.tar.gz').with(
30+
source: 'https://dl.google.com/go/go1.25.6.linux-amd64.tar.gz',
3131
extract: 'true',
32-
extract_path: '/opt/go-1.22.5',
32+
extract_path: '/opt/go-1.25.6',
3333
extract_command: 'tar xfz %s --strip-components=1',
34-
creates: '/opt/go-1.22.5/bin/go',
34+
creates: '/opt/go-1.25.6/bin/go',
3535
cleanup: 'true',
3636
user: 'root',
3737
group: 'root',
38-
require: 'File[/opt/go-1.22.5]',
38+
require: 'File[/opt/go-1.25.6]',
3939
before: [
4040
'File[go-binary]',
4141
'File[gofmt-binary]',
@@ -44,11 +44,11 @@
4444
end
4545

4646
it do
47-
is_expected.to contain_file('go-binary').with(ensure: 'link', path: '/usr/bin/go', target: '/opt/go-1.22.5/bin/go')
47+
is_expected.to contain_file('go-binary').with(ensure: 'link', path: '/usr/bin/go', target: '/opt/go-1.25.6/bin/go')
4848
end
4949

5050
it do
51-
is_expected.to contain_file('gofmt-binary').with(ensure: 'link', path: '/usr/bin/gofmt', target: '/opt/go-1.22.5/bin/gofmt')
51+
is_expected.to contain_file('gofmt-binary').with(ensure: 'link', path: '/usr/bin/gofmt', target: '/opt/go-1.25.6/bin/gofmt')
5252
end
5353
end
5454
end

0 commit comments

Comments
 (0)