Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update default version 1.16.1->1.16.3 #643

Merged
merged 1 commit into from Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion REFERENCE.md
Expand Up @@ -549,7 +549,7 @@ Data type: `String[1]`

Specify version of consul binary to download.

Default value: `'1.16.1'`
Default value: `'1.16.3'`

##### <a name="-consul--watches"></a>`watches`

Expand Down
2 changes: 1 addition & 1 deletion manifests/init.pp
Expand Up @@ -137,7 +137,7 @@
Enum['stopped', 'running'] $service_ensure = 'running',
Hash $services = {},
String[1] $user = $consul::params::user,
String[1] $version = '1.16.1',
String[1] $version = '1.16.3',
Hash $watches = {},
Optional[String[1]] $shell = $consul::params::shell,
Boolean $enable_beta_ui = false,
Expand Down
12 changes: 6 additions & 6 deletions spec/acceptance/class_spec.rb
Expand Up @@ -46,7 +46,7 @@
pp = <<-EOS
package { 'unzip': ensure => present }
-> class { 'consul':
version => '1.16.1',
version => '1.16.3',
manage_service => true,
config_hash => {
'datacenter' => 'east-aws',
Expand All @@ -73,7 +73,7 @@
end

describe command('consul version') do
its(:stdout) { is_expected.to match %r{Consul v1.16.1} }
its(:stdout) { is_expected.to match %r{Consul v1.16.3} }
end

describe file('/etc/consul/config.json') do
Expand All @@ -87,7 +87,7 @@
pp = <<-EOS
package { 'unzip': ensure => present }
-> class { 'consul':
version => '1.16.1',
version => '1.16.3',
manage_service => true,
config_hash => {
'datacenter' => 'east-aws',
Expand Down Expand Up @@ -117,7 +117,7 @@
end

describe command('consul version') do
its(:stdout) { is_expected.to match %r{Consul v1.16.1} }
its(:stdout) { is_expected.to match %r{Consul v1.16.3} }
end

describe file('/etc/consul/config.json') do
Expand All @@ -133,7 +133,7 @@
pp = <<-EOS
package { 'unzip': ensure => present }
-> class { 'consul':
version => '1.16.1',
version => '1.16.3',
manage_service => true,
config_hash => {
'datacenter' => 'east-aws',
Expand Down Expand Up @@ -207,7 +207,7 @@
end

describe command('consul version') do
its(:stdout) { is_expected.to match %r{Consul v1.16.1} }
its(:stdout) { is_expected.to match %r{Consul v1.16.3} }
end

describe command("consul acl token list --token #{acl_master_token} | grep Description") do
Expand Down
14 changes: 7 additions & 7 deletions spec/classes/init_spec.rb
Expand Up @@ -160,9 +160,9 @@
end

context 'When installing via URL by default' do
it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.1.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.1/consul_1.16.1_linux_amd64.zip') }
it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.3.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.3/consul_1.16.3_linux_amd64.zip') }
it { is_expected.to contain_file('/opt/consul/archives').with(ensure: 'directory') }
it { is_expected.to contain_file('/opt/consul/archives/consul-1.16.1').with(ensure: 'directory') }
it { is_expected.to contain_file('/opt/consul/archives/consul-1.16.3').with(ensure: 'directory') }
it { is_expected.to contain_file('/usr/local/bin/consul').that_notifies('Class[consul::run_service]') }
end

Expand All @@ -173,20 +173,20 @@
}
end

it { is_expected.to contain_archive('/usr/share/puppet-archive/consul-1.16.1.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.1/consul_1.16.1_linux_amd64.zip') }
it { is_expected.to contain_archive('/usr/share/puppet-archive/consul-1.16.3.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.3/consul_1.16.3_linux_amd64.zip') }
it { is_expected.to contain_file('/usr/share/puppet-archive').with(ensure: 'directory') }
it { is_expected.to contain_file('/usr/share/puppet-archive/consul-1.16.1').with(ensure: 'directory') }
it { is_expected.to contain_file('/usr/share/puppet-archive/consul-1.16.3').with(ensure: 'directory') }
it { is_expected.to contain_file('/usr/local/bin/consul').that_notifies('Class[consul::run_service]') }
end

context 'When installing by archive via URL and current version is already installed' do
let(:facts) do
facts.merge({
consul_version: '1.16.1'
consul_version: '1.16.3'
})
end

it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.1.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.1/consul_1.16.1_linux_amd64.zip') }
it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.3.zip').with(source: 'https://releases.hashicorp.com/consul/1.16.3/consul_1.16.3_linux_amd64.zip') }
it { is_expected.to contain_file('/usr/local/bin/consul') }
it { is_expected.not_to contain_notify(['Class[consul::run_service]']) }
end
Expand All @@ -209,7 +209,7 @@
}
end

it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.1.zip').with(source: 'http://myurl') }
it { is_expected.to contain_archive('/opt/consul/archives/consul-1.16.3.zip').with(source: 'http://myurl') }
it { is_expected.to contain_file('/usr/local/bin/consul').that_notifies('Class[consul::run_service]') }
end

Expand Down