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

PRI-289 [DM] Upgrade consul version to v1.0.1 and edit tests accordingly #4

Merged
merged 1 commit into from
Feb 13, 2018
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ consul_pip_pkgs:

consul_prereq_pkgs: [ jq, unzip, python-pip ]

consul_version: 0.7.5
consul_version: 1.0.1
consul_pkg: "consul_{{ consul_version }}_linux_amd64.zip"
consul_pkg_url: "https://releases.hashicorp.com/consul/{{ consul_version }}/{{ consul_pkg }}"
consul_checksum_file: "consul_{{ consul_version }}_SHA256SUMS"
Expand Down
9 changes: 1 addition & 8 deletions test/integration/client/serverspec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#{consul_home}/data
#{consul_home}/logs
#{consul_home}/scripts
#{consul_home}/ui
).each do |dir|
describe file(dir) do
it { should be_directory }
Expand Down Expand Up @@ -60,7 +59,7 @@

describe command("#{consul_bin_dir}/consul --version") do
its(:exit_status) { should eq 0 }
its(:stdout) { should match %r(Consul v0.7.5) }
its(:stdout) { should match %r(Consul v1.0.1) }
end

consul_scripts.each do |f|
Expand Down Expand Up @@ -95,12 +94,6 @@
its(:args) { should match %r(consul agent -config-dir .*) }
end

describe file("#{consul_home}/ui/index.html") do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by consul_user }
end

describe command("curl -s http://localhost:8500/v1/kv/?recurse | jq '.[] | .Key'") do
its(:exit_status) { should eq 0 }
its(:stdout) { should match %r(web/key1) }
Expand Down
8 changes: 1 addition & 7 deletions test/integration/server01/serverspec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#{consul_home}/data
#{consul_home}/logs
#{consul_home}/scripts
#{consul_home}/ui
).each do |dir|
describe file(dir) do
it { should be_directory }
Expand Down Expand Up @@ -60,7 +59,7 @@

describe command("#{consul_bin_dir}/consul --version") do
its(:exit_status) { should eq 0 }
its(:stdout) { should match %r(Consul v0.7.5) }
its(:stdout) { should match %r(Consul v1.0.1) }
end

consul_scripts.each do |f|
Expand Down Expand Up @@ -95,8 +94,3 @@
its(:args) { should match %r(consul agent -config-dir .*) }
end

describe file("#{consul_home}/ui/index.html") do
it { should be_file }
it { should be_mode 644 }
it { should be_owned_by consul_user }
end
2 changes: 1 addition & 1 deletion test/integration/server02/serverspec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

describe command("#{consul_bin_dir}/consul --version") do
its(:exit_status) { should eq 0 }
its(:stdout) { should match %r(Consul v0.7.5) }
its(:stdout) { should match %r(Consul v1.0.1) }
end

describe service('consul') do
Expand Down
4 changes: 2 additions & 2 deletions test/integration/server03/serverspec/default_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

describe command("#{consul_bin_dir}/consul --version") do
its(:exit_status) { should eq 0 }
its(:stdout) { should match %r(Consul v0.7.5) }
its(:stdout) { should match %r(Consul v1.0.1) }
end

describe command("#{consul_bin_dir}/consul operator raft -list-peers| grep -c ':8300'") do
describe command("#{consul_bin_dir}/consul operator raft list-peers| grep -c ':8300'") do
its(:exit_status) { should eq 0 }
its(:stdout) { should match '3' }
end
Expand Down