Skip to content

Commit e2e7627

Browse files
committed
add test to validate vault upgrade
1 parent 4aadbbd commit e2e7627

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

spec/acceptance/class_spec.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,29 @@ class { '::vault':
108108
it { is_expected.to be_listening.on('127.0.0.1').with('tcp') }
109109
end
110110
end
111+
112+
# we will test if we can update vault to another version
113+
context 'updated vault version' do
114+
it 'works idempotently with no errors' do
115+
pp = <<-MANIFEST
116+
class { 'vault':
117+
version => '0.10.1'
118+
storage => {
119+
file => {
120+
path => '/tmp',
121+
}
122+
},
123+
listener => [{
124+
tcp => {
125+
address => '127.0.0.1:8200',
126+
tls_disable => 1,
127+
}
128+
}]
129+
}
130+
MANIFEST
131+
# Run it twice and test for idempotency
132+
apply_manifest(pp, catch_failures: true)
133+
apply_manifest(pp, catch_changes: true)
134+
end
135+
end
111136
end

0 commit comments

Comments
 (0)