From 60a4ffeebfddea87cf3e5a6b856d44eacd6fca35 Mon Sep 17 00:00:00 2001 From: Damian Lukowski Date: Thu, 6 Jun 2024 12:22:48 +0200 Subject: [PATCH] Add failing test for gluster::volume Evaluation Error: Unknown variable: 'to_add'. (file: .../spec/fixtures/modules/gluster/manifests/volume.pp, line: 265, column: 22) --- spec/defines/volume_spec.rb | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/spec/defines/volume_spec.rb b/spec/defines/volume_spec.rb index da638266..e49de551 100644 --- a/spec/defines/volume_spec.rb +++ b/spec/defines/volume_spec.rb @@ -100,6 +100,28 @@ end end + describe 'with existent volume' do + let(:title) { 'volume1' } + let(:facts) do + { + gluster_binary: '/usr/sbin/gluster', + gluster_peer_list: 'srv1.local,srv2.local', + gluster_volume_list: 'volume1', + gluster_volume_volume1_bricks: 'srv1.local:/export/volume1/brick,srv2.local:/export/volume1/brick', + } + end + let(:params) do + { + replica: 2, + bricks: [ + 'srv1.local:/export/volume1/brick', + 'srv2.local:/export/volume1/brick', + ], + } + end + it { is_expected.to compile.with_all_deps } + end + describe 'single node' do let(:facts) do {