Add support for the listing_formats middleware

Change-Id: I0dd121bf866fde715756a6c7c10e6153e17c5d2c
This commit is contained in:
Takashi Kajinami 2021-02-21 18:46:13 +09:00
parent a57d5fe28a
commit 68a8d47cf7
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,26 @@
#
# Configure swift listing_formats.
#
# == Parameters
#
# == Examples
#
# include swift::proxy::listing_formats
#
# == Authors
#
# Takashi Kajinami <tkajinam@redhat.com>
#
# == Copyright
#
# Copyright (C) 2021 Red Hat
#
class swift::proxy::listing_formats (
) {
include swift::deps
swift_proxy_config {
'filter:listing_formats/use': value => 'egg:swift#listing_formats';
}
}

View File

@ -0,0 +1,4 @@
---
features:
- |
The new ``swift::proxy::listing_formats`` class has been added.

View File

@ -0,0 +1,21 @@
require 'spec_helper'
describe 'swift::proxy::listing_formats' do
shared_examples 'swift::proxy::listing_formats' do
describe "when using default parameters" do
it { is_expected.to contain_swift_proxy_config('filter:listing_formats/use').with_value('egg:swift#listing_formats') }
end
end
on_supported_os({
:supported_os => OSDefaults.get_supported_os
}).each do |os,facts|
context "on #{os}" do
let (:facts) do
facts.merge(OSDefaults.get_facts())
end
it_configures 'swift::proxy::listing_formats'
end
end
end