Skip to content

Commit

Permalink
Add some unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Farnsworth committed Nov 18, 2019
1 parent 2cd91c3 commit a53dd49
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spec/classes/nginx_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,18 @@
value: 'warn',
match: ' error_log /var/log/nginx/error.log warn;'
},
{
title: 'should set limit_req_zone',
attr: 'limit_req_zone',
value: [
'$binary_remote_addr zone=myzone1:10m rate=5r/s',
'$binary_remote_addr zone=myzone2:10m rate=5r/s'
],
match: [
' limit_req_zone $binary_remote_addr zone=myzone1:10m rate=5r/s;',
' limit_req_zone $binary_remote_addr zone=myzone2:10m rate=5r/s;'
]
},
{
title: 'should set pid',
attr: 'pid',
Expand Down
6 changes: 6 additions & 0 deletions spec/defines/resource_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
value: 'any',
match: ' satisfy any;'
},
{
title: 'should set limit_zone',
attr: 'limit_zone',
value: 'myzone1',
match: ' limit_req zone=myzone1;'
},
{
title: 'should set expires',
attr: 'expires',
Expand Down

0 comments on commit a53dd49

Please sign in to comment.