Skip to content

Commit

Permalink
test(inspec): add test for log_format saltstack-formulas#219
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Apr 26, 2019
1 parent 3679172 commit 4ed788e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/integration/default/controls/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
it { should be_owned_by 'root' }
it { should be_grouped_into 'root' }
its('mode') { should cmp '0644' }
its('content') { should include %Q[ log_format main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';] }
end

# snippets configuration
Expand Down
8 changes: 8 additions & 0 deletions test/salt/default/pillar/nginx.sls
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ nginx:
letsencrypt:
- location ^~ /.well-known/acme-challenge/:
- proxy_pass: http://localhost:9999
server:
config:
http:
### module ngx_http_log_module example
log_format: |-
main '$remote_addr - $remote_user [$time_local] $status '
'"$request" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'
servers:
managed:
default:
Expand Down

0 comments on commit 4ed788e

Please sign in to comment.