From 1f533d3c3107ce99c4840cee210bea09471a46ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Bj=C3=B6rklin?= Date: Tue, 26 Mar 2019 21:35:59 -0700 Subject: [PATCH] test(manual): update test, clean link * don't try to stop non-existing service --- .kitchen.yml | 4 ++-- test/integration/install_binary/vault_spec.rb | 2 +- vault/package/clean.sls | 4 ++++ vault/package/install.sls | 1 + vault/service/init.sls | 2 +- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index aa52c30..60865a0 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -50,8 +50,8 @@ suites: - vault vault.sls: vault: -# version: 1.0.3 # test upgrades by doing a double-converge, changing the version pillar between each one - version: 1.1.0 +# version: 1.1.0 # test upgrades by doing a double-converge, changing the version pillar between each one + version: 1.0.3 verify_download: False - name: dev_server diff --git a/test/integration/install_binary/vault_spec.rb b/test/integration/install_binary/vault_spec.rb index 34dbb74..33a6892 100644 --- a/test/integration/install_binary/vault_spec.rb +++ b/test/integration/install_binary/vault_spec.rb @@ -6,7 +6,7 @@ describe command('/usr/local/bin/vault -version') do its(:exit_status) { should eq 0 } its(:stderr) { should be_empty } - its(:stdout) { should match(/^Vault v0.11.2 \('2b1a4304374712953ff606c6a925bbe90a4e85dd'\)/) } + its(:stdout) { should match(/^Vault v1.0.3 \('85909e3373aa743c34a6a0ab59131f61fd9e8e43'\)/) } end describe service('vault') do diff --git a/vault/package/clean.sls b/vault/package/clean.sls index a31d808..4bdf556 100644 --- a/vault/package/clean.sls +++ b/vault/package/clean.sls @@ -14,6 +14,10 @@ vault-package-clean-file-absent-data: file.absent: - name: /var/lib/vault +vault-package-clean-file-absent-link: + file.absent: + - name: /usr/local/bin/vault + vault-package-clean-user-absent: user.absent: - name: vault diff --git a/vault/package/install.sls b/vault/package/install.sls index f940580..038e479 100644 --- a/vault/package/install.sls +++ b/vault/package/install.sls @@ -32,6 +32,7 @@ vault-package-install-service-dead: - name: vault - onchanges: - file: vault-package-install-file-managed + - onlyif: test -f /etc/systemd/system/vault.service vault-package-install-archive-extracted: archive.extracted: diff --git a/vault/service/init.sls b/vault/service/init.sls index 61e5835..53d28f3 100644 --- a/vault/service/init.sls +++ b/vault/service/init.sls @@ -12,7 +12,7 @@ vault-service-init-file-managed: vault-service-init-service-running: service.running: - name: vault - - enable: true + - enable: True - watch: - archive: vault-package-install-archive-extracted - file: vault-service-init-file-managed