Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/puppet/type/rabbitmq_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
message-ttl
queue-version
shards-per-node
stream-max-segment-size-bytes
target-group-size
].freeze

Expand Down
13 changes: 13 additions & 0 deletions spec/unit/puppet/type/rabbitmq_policy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,19 @@
end.to raise_error(Puppet::Error, %r{Invalid queue-version value.*oogabooga})
end

it 'accepts and converts the stream-max-segment-size-bytes value' do
definition = { 'stream-max-segment-size-bytes' => '5000000' }
policy[:definition] = definition
expect(policy[:definition]['stream-max-segment-size-bytes']).to eq(5_000_000)
end

it 'does not accept non-numeric stream-max-segment-size-bytes value' do
definition = { 'stream-max-segment-size-bytes' => 'bogus' }
expect do
policy[:definition] = definition
end.to raise_error(Puppet::Error, %r{Invalid stream-max-segment-size-bytes value.*bogus})
end

it 'accepts and converts the target-group-size value' do
definition = { 'target-group-size' => '7' }
policy[:definition] = definition
Expand Down
Loading