Merge pull request #6 from myoung34/lower_test_permutations

Lower test permutations
This commit is contained in:
myoung34 2017-04-28 15:31:22 -05:00 committed by GitHub
commit 95b9429a73
6 changed files with 17 additions and 71 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -22,7 +22,6 @@ generate self signed SSL certs:
- group: root - group: root
- mode: 755 - mode: 755
{%- if vault.dev_mode %}
/etc/vault/config: /etc/vault/config:
file.directory: file.directory:
- user: root - user: root
@ -40,7 +39,6 @@ generate self signed SSL certs:
- mode: 644 - mode: 644
- require: - require:
- file: /etc/vault/config - file: /etc/vault/config
{% endif -%}
{%- if vault.service.type == 'systemd' %} {%- if vault.service.type == 'systemd' %}
/etc/systemd/system/vault.service: /etc/systemd/system/vault.service:
@ -71,6 +69,4 @@ vault:
{%- 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 -%}