diff --git a/lib/puppet/type/rabbitmq_policy.rb b/lib/puppet/type/rabbitmq_policy.rb index 0bf11ad49..33f35f0b2 100644 --- a/lib/puppet/type/rabbitmq_policy.rb +++ b/lib/puppet/type/rabbitmq_policy.rb @@ -11,6 +11,7 @@ max-length max-length-bytes message-ttl + queue-version shards-per-node ].freeze diff --git a/spec/unit/puppet/type/rabbitmq_policy_spec.rb b/spec/unit/puppet/type/rabbitmq_policy_spec.rb index 109170d01..46742aef0 100644 --- a/spec/unit/puppet/type/rabbitmq_policy_spec.rb +++ b/spec/unit/puppet/type/rabbitmq_policy_spec.rb @@ -221,6 +221,19 @@ end.to raise_error(Puppet::Error, %r{Invalid initial-cluster-size value 'impressive}) end + it 'accepts and converts the queue-version value' do + definition = { 'queue-version' => '2' } + policy[:definition] = definition + expect(policy[:definition]['queue-version']).to eq(2) + end + + it 'does not accept non-numeric queue-version value' do + definition = { 'queue-version' => 'oogabooga' } + expect do + policy[:definition] = definition + end.to raise_error(Puppet::Error, %r{Invalid queue-version value.*oogabooga}) + end + context 'accepts list value in ha-params when ha-mode = nodes' do before do policy[:definition] = definition