Merge some tests to make travis faster (less permutations)
This commit is contained in:
parent
da9c643213
commit
aafb5a1ae0
6 changed files with 18 additions and 72 deletions
26
.kitchen.yml
26
.kitchen.yml
|
@ -29,12 +29,6 @@ platforms:
|
||||||
run_command: /sbin/init
|
run_command: /sbin/init
|
||||||
|
|
||||||
suites:
|
suites:
|
||||||
- name: default
|
|
||||||
provisioner:
|
|
||||||
state_top:
|
|
||||||
base:
|
|
||||||
'*':
|
|
||||||
- vault
|
|
||||||
- name: dev_server_systemd
|
- name: dev_server_systemd
|
||||||
excludes:
|
excludes:
|
||||||
- amazonlinux
|
- amazonlinux
|
||||||
|
@ -53,7 +47,7 @@ suites:
|
||||||
vault:
|
vault:
|
||||||
service:
|
service:
|
||||||
type: systemd
|
type: systemd
|
||||||
- name: dev_server_upstart
|
- name: dev_server_upstart_s3
|
||||||
includes:
|
includes:
|
||||||
- amazonlinux
|
- amazonlinux
|
||||||
provisioner:
|
provisioner:
|
||||||
|
@ -71,24 +65,6 @@ suites:
|
||||||
vault:
|
vault:
|
||||||
service:
|
service:
|
||||||
type: upstart
|
type: upstart
|
||||||
- name: server_backend_s3
|
|
||||||
includes:
|
|
||||||
- amazonlinux
|
|
||||||
provisioner:
|
|
||||||
state_top:
|
|
||||||
base:
|
|
||||||
'*':
|
|
||||||
- vault
|
|
||||||
- vault.server
|
|
||||||
pillars:
|
|
||||||
top.sls:
|
|
||||||
base:
|
|
||||||
'*':
|
|
||||||
- vault
|
|
||||||
vault.sls:
|
|
||||||
vault:
|
|
||||||
backend:
|
backend:
|
||||||
type: s3
|
type: s3
|
||||||
bucket: com-saltstack-vault
|
bucket: com-saltstack-vault
|
||||||
service:
|
|
||||||
type: upstart
|
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
describe command('/usr/local/bin/vault -version') do
|
|
||||||
its(:exit_status) { should eq 0 }
|
|
||||||
its(:stderr) { should be_empty }
|
|
||||||
its(:stdout) { should match(/^Vault v[0-9\.]+ \('[0-9a-f]+'\)/) }
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
|
describe command('/usr/local/bin/vault -version') do
|
||||||
|
its(:exit_status) { should eq 0 }
|
||||||
|
its(:stderr) { should be_empty }
|
||||||
|
its(:stdout) { should match(/^Vault v[0-9\.]+ \('[0-9a-f]+'\)/) }
|
||||||
|
end
|
||||||
|
|
||||||
describe file('/etc/vault/config/server.hcl') do
|
describe file('/etc/vault/config/server.hcl') do
|
||||||
it { should be_a_file }
|
it { should be_a_file }
|
||||||
expected =<<-EOF
|
expected =<<-EOF
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
|
describe command('/usr/local/bin/vault -version') do
|
||||||
|
its(:exit_status) { should eq 0 }
|
||||||
|
its(:stderr) { should be_empty }
|
||||||
|
its(:stdout) { should match(/^Vault v[0-9\.]+ \('[0-9a-f]+'\)/) }
|
||||||
|
end
|
||||||
|
|
||||||
describe file('/etc/vault/config/server.hcl') do
|
describe file('/etc/vault/config/server.hcl') do
|
||||||
it { should be_a_file }
|
it { should be_a_file }
|
||||||
expected = <<-EOF
|
expected = <<-EOF
|
||||||
|
|
||||||
|
backend "s3" {
|
||||||
|
bucket = "com-saltstack-vault"
|
||||||
|
}
|
||||||
listener "tcp" {
|
listener "tcp" {
|
||||||
address = "0.0.0.0:8200"
|
address = "0.0.0.0:8200"
|
||||||
tls_disable = 0
|
tls_disable = 0
|
|
@ -1,36 +0,0 @@
|
||||||
describe file('/etc/vault/config/server.hcl') do
|
|
||||||
it { should be_a_file }
|
|
||||||
its(:content) { should match /bucket = "com-saltstack-vault"/ }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe file('/etc/init/vault.conf') do
|
|
||||||
it { should be_a_file }
|
|
||||||
its(:content) { should_not match /syslog/ }
|
|
||||||
end
|
|
||||||
|
|
||||||
if os[:family] == 'amazon'
|
|
||||||
# serverspec assumes 'service' resource to be
|
|
||||||
# init.d for rhel-based os. have to just check
|
|
||||||
# that it is running, that means that it started
|
|
||||||
# with the instance
|
|
||||||
describe command('sudo initctl list | grep vault | grep -v grep') do
|
|
||||||
its(:stdout) { should match(/vault start\/running/) }
|
|
||||||
its(:stderr) { should be_empty }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe processes("vault") do
|
|
||||||
its('users') { should eq ['root'] }
|
|
||||||
end
|
|
||||||
|
|
||||||
else
|
|
||||||
describe service('vault') do
|
|
||||||
it { should be_enabled }
|
|
||||||
it { should be_running }
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
describe file('/var/log/vault.log') do
|
|
||||||
it { should be_a_file }
|
|
||||||
its(:content) { should match(/WARNING: Dev mode is enabled!/) }
|
|
||||||
end
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ generate self signed SSL certs:
|
||||||
- user: root
|
- user: root
|
||||||
- group: root
|
- group: root
|
||||||
- mode: 755
|
- mode: 755
|
||||||
|
|
||||||
/etc/vault/config:
|
/etc/vault/config:
|
||||||
file.directory:
|
file.directory:
|
||||||
- user: root
|
- user: root
|
||||||
|
@ -65,12 +65,8 @@ generate self signed SSL certs:
|
||||||
vault:
|
vault:
|
||||||
service.running:
|
service.running:
|
||||||
- enable: True
|
- enable: True
|
||||||
{%- if vault.self_signed_cert.enabled or vault.dev_mode %}
|
|
||||||
- require:
|
- require:
|
||||||
{%- if vault.self_signed_cert.enabled %}
|
{%- if vault.self_signed_cert.enabled %}
|
||||||
- cmd: generate self signed SSL certs
|
- cmd: generate self signed SSL certs
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
{%- if vault.dev_mode %}
|
|
||||||
- file: /etc/vault/config/server.hcl
|
- file: /etc/vault/config/server.hcl
|
||||||
{% endif -%}
|
|
||||||
{% endif -%}
|
|
||||||
|
|
Loading…
Reference in a new issue