Merge "Add support for the listing_formats middleware"

This commit is contained in:
Zuul 2021-03-01 16:39:22 +00:00 committed by Gerrit Code Review
commit 0c65a04406
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