Skip to content

Commit

Permalink
CI: Install Nomad 1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
maxadamo authored and bastelfreak committed Jan 9, 2025
1 parent a7a70a5 commit 33a6c20
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions spec/acceptance/url_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
pp = <<-EOS
class { 'nomad':
install_method => 'url',
version => '1.0.3',
version => '1.9.4',
config_hash => {
region => 'us-west',
datacenter => 'ptk',
Expand All @@ -29,17 +29,17 @@ class { 'nomad':
apply_manifest(pp, catch_changes: true)
end

describe file('/var/lib/nomad') && file('/opt/puppet-archive/nomad-1.0.3') do
describe file('/var/lib/nomad') && file('/opt/puppet-archive/nomad-1.9.4') do
it { is_expected.to be_directory }
end

describe file('/opt/puppet-archive/nomad-1.0.3/nomad') do
describe file('/opt/puppet-archive/nomad-1.9.4/nomad') do
it { is_expected.to be_file }
end

describe file('/usr/bin/nomad') do
it { is_expected.to be_symlink }
it { is_expected.to be_linked_to '/opt/puppet-archive/nomad-1.0.3/nomad' }
it { is_expected.to be_linked_to '/opt/puppet-archive/nomad-1.9.4/nomad' }
end

describe service('nomad') do
Expand All @@ -48,7 +48,7 @@ class { 'nomad':
end

describe command('nomad version') do
its(:stdout) { is_expected.to match(%r{Nomad v1\.0\.3}) }
its(:stdout) { is_expected.to match(%r{Nomad v1\.9\.4}) }
end
end
end
16 changes: 8 additions & 8 deletions spec/classes/init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
install_method: 'url',
manage_service_file: true,
version: '1.0.3'
version: '1.9.4'
}
end

Expand Down Expand Up @@ -92,7 +92,7 @@
{
install_method: 'url',
manage_service_file: true,
version: '1.0.3',
version: '1.9.4',
manage_repo: true
}
end
Expand Down Expand Up @@ -151,13 +151,13 @@
let(:params) do
{
install_method: 'url',
version: '1.0.3'
version: '1.9.4'
}
end

it { is_expected.to contain_archive('/opt/puppet-archive/nomad-1.0.3.zip').with(source: 'https://releases.hashicorp.com/nomad/1.0.3/nomad_1.0.3_linux_amd64.zip') }
it { is_expected.to contain_archive('/opt/puppet-archive/nomad-1.9.4.zip').with(source: 'https://releases.hashicorp.com/nomad/1.9.4/nomad_1.9.4_linux_amd64.zip') }
it { is_expected.to contain_file('/opt/puppet-archive').with(ensure: 'directory') }
it { is_expected.to contain_file('/opt/puppet-archive/nomad-1.0.3').with(ensure: 'directory') }
it { is_expected.to contain_file('/opt/puppet-archive/nomad-1.9.4').with(ensure: 'directory') }
it { is_expected.to contain_file('/usr/bin/nomad').that_notifies(['Class[nomad::run_service]']) }
end

Expand All @@ -178,11 +178,11 @@
{
install_method: 'url',
download_url: 'http://myurl',
version: '1.0.3',
version: '1.9.4',
}
end

it { is_expected.to contain_archive('/opt/puppet-archive/nomad-1.0.3.zip').with(source: 'http://myurl') }
it { is_expected.to contain_archive('/opt/puppet-archive/nomad-1.9.4.zip').with(source: 'http://myurl') }
it { is_expected.to contain_file('/usr/bin/nomad').that_notifies(['Class[nomad::run_service]']) }
end

Expand All @@ -194,7 +194,7 @@
end

it { is_expected.not_to contain_package('nomad') }
it { is_expected.not_to contain_archive('/opt/puppet-archive/nomad-1.0.3.zip') }
it { is_expected.not_to contain_archive('/opt/puppet-archive/nomad-1.9.4.zip') }
end

context 'When data_dir is provided' do
Expand Down

0 comments on commit 33a6c20

Please sign in to comment.