fix auth_basic/auth_basic_user_file variable detection
This commit is contained in:
parent
99e9d82f12
commit
43d628d4f0
2 changed files with 14 additions and 15 deletions
|
@ -338,19 +338,18 @@ describe 'nginx::resource::location' do
|
|||
:value => ['name1','name2'],
|
||||
:match => ' index name1 name2;',
|
||||
},
|
||||
#TODO: fix template
|
||||
#{
|
||||
# :title => 'should set auth_basic',
|
||||
# :attr => 'auth_basic',
|
||||
# :value => 'value',
|
||||
# :match => ' auth_basic "value";',
|
||||
#},
|
||||
#{
|
||||
# :title => 'should set auth_basic_user_file',
|
||||
# :attr => 'auth_basic_user_file',
|
||||
# :value => 'value',
|
||||
# :match => ' auth_basic_user_file value;',
|
||||
#},
|
||||
{
|
||||
:title => 'should set auth_basic',
|
||||
:attr => 'auth_basic',
|
||||
:value => 'value',
|
||||
:match => ' auth_basic "value";',
|
||||
},
|
||||
{
|
||||
:title => 'should set auth_basic_user_file',
|
||||
:attr => 'auth_basic_user_file',
|
||||
:value => 'value',
|
||||
:match => ' auth_basic_user_file value;',
|
||||
},
|
||||
{
|
||||
:title => 'should contain ordered appended directives',
|
||||
:attr => 'location_cfg_append',
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
<% if @index_files -%>
|
||||
index <% @index_files.each do |i| %> <%= i %><% end %>;
|
||||
<% end -%>
|
||||
<% if defined? auth_basic -%>
|
||||
<% if defined? @auth_basic -%>
|
||||
auth_basic "<%= @auth_basic %>";
|
||||
<% end -%>
|
||||
<% if defined? auth_basic_user_file -%>
|
||||
<% if defined? @auth_basic_user_file -%>
|
||||
auth_basic_user_file <%= @auth_basic_user_file %>;
|
||||
<% end -%>
|
||||
<% if @location_cfg_append -%><% @location_cfg_append.sort_by {|k,v| k}.each do |key,value| -%>
|
||||
|
|
Loading…
Reference in a new issue