Commit graph

145 commits

Author SHA1 Message Date
Matthew Haughton
a002d8932e bug fixes surfaced by future parser
* concat::fragment requires 'order' to be a string
* init parameters added in #373 referred to wrong variable name in params.pp
* cannot perform regex match on a number, so make {fastcgi,proxy}_cache_levels
  a string by default
* bug fixed in test suite
2014-09-04 23:24:14 -04:00
Pablo Fredrikson
ac1e9b70f6 Removed proxy_cache_valid as default when using proxy_cache option
Added some tests also
2014-09-03 18:39:55 -03:00
Matthew Haughton
bbf6f4584d Merge pull request #413 from zshahan/enable_streaming
Add flv and mp4 parameters to vhost::location
2014-08-22 13:24:12 -04:00
Matthew Haughton
0adf7f7876 Merge pull request #378 from 3flex/rspec2.99-updates
Convert specs to RSpec 2.99.1 syntax with Transpec
2014-08-22 11:50:49 -04:00
zshahan
0c81255724 fix? 2014-08-20 19:53:32 -05:00
Matthew Haughton
5aa2f66ca3 Correct errors introduced by using latest apt module
Since librarian-puppet had locked to old versions of Forge modules
but puppetlabs_spec_helper is now pulling the latest version,
there's this incompatibility to take care of in the test suite.
2014-08-18 22:41:34 -04:00
zshahan
68a46d3ed1 added streaming options. 2014-08-18 20:34:43 -05:00
Christoph Körner
9bedd7950a Renamed params to fastcgi_param and moved to fastcgi.erb 2014-08-13 12:24:59 +02:00
Christoph Körner
96138715d1 Add support of custom fastcgi_params 2014-08-11 10:04:21 +02:00
Matthew Haughton
32bc360d45 Convert specs to RSpec 2.99.1 syntax with Transpec
This conversion is done by Transpec 2.3.4 with the following command:
    transpec -c "rake spec" spec/classes/ spec/defines/ spec/spec_helper.rb

* 210 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 19 conversions
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

* 15 conversions
    from: == expected
      to: eq(expected)

* 15 conversions
    from: obj.should
      to: expect(obj).to

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-07-17 22:28:38 -04:00
Motiejus Jakštys
0a1dacf605 Allow using $http_cfg_append with list of lists
It should be possible to include array of arrays in order to have
duplicate configuration keys (when permitted), like:

    nginx::http_cfg_append:
        - [include, /etc/nginx/vhosts/*.ngx]
        - [include, /etc/nginx/vhosts/*/*.ngx]
2014-07-01 06:35:20 +02:00
Carl P. Corliss
7be12d0870 new raw_prepend / raw_append feature for vhosts & locations
- added raw_prepend / raw_append to vhosts & locations, which
    adds raw lines to the vhost/location /without/ semicolons
  - added location_raw_prepend / location_raw_append to vhost
    for passing through to default location
  - added spec tests for new parameters
  - cleaned up location specs to match new header/body/footer setup
    reducing duplicate checks by testing header/footer separately.
  - cleaned up whitespace (2 space) in touched files
  - used `<%-` in erb templates to allow the use of leading
    whitespace, making the logic flow more readable
  - Also adds spec tests for recent vhost updates:
    - client_body_timeout
    - client_header_timeout
    - gzip_types
    - testing that the first server_name is used when www_to_non_www is true
2014-06-26 00:00:37 -04:00
Carl P. Corliss
9b14ba901e add ability to designate location as internal 2014-06-24 10:42:27 -04:00
James Fryman
400e58a505 Merge pull request #347 from rabbitt/feature/upstream-exports
Reintegrate jfryman/puppet-nginx#331 (upstream exports/collections)
2014-06-24 09:31:19 -05:00
James Fryman
473ed04463 Merge pull request #354 from janorn/temp_paths
Add client_body_temp_path and proxy_temp_path to proxy.conf.
2014-06-24 09:27:18 -05:00
Jan Örnstedt
65c90f1999 Added tests for
pid
http_tcp_nodelay
http_tcp_nopush
keepalive_timeout
2014-06-24 01:41:22 +02:00
Jan Örnstedt
ebd2a6a608 Add client_body_temp_path and proxy_temp_path to proxy.conf. 2014-06-24 00:33:56 +02:00
Carl P. Corliss
9519298aba use return instead of rewrite for simple redirects (e.g., www -> naked domain) 2014-06-23 11:46:43 -04:00
Carl P. Corliss
9cf983504a Reintegrate jfryman/puppet-nginx#331 (upstream exports/collections)
- resurrecting jfryman/puppet-nginx#331 from @rainopik
- update (concat/stdlib) dependency version requirements based on current usage
- fix upstream tests to work with rainopik's changes in what was jfryman/puppet-nginx#331
2014-06-21 12:36:28 -04:00
Robin Gloster
dc1b4b528c fix tests 2014-06-20 16:35:23 +02:00
Jan Örnstedt
d33b4e135d Change nx_conf_dir to config::conf_dir to make it possible to configure via parameter. 2014-06-16 16:55:37 +02:00
James Fryman
03094eabe5 Merge pull request #337 from rabbitt/master
add ability to define geo and map mappings
2014-06-16 09:43:15 -05:00
Carl P. Corliss
198d326eb0 use nx_conf_dir for nginx configuration path 2014-06-13 10:05:30 -04:00
Jan Örnstedt
1bfd597c92 Add pre conditions to spec file. 2014-06-13 14:22:45 +02:00
Carl P. Corliss
d3810eb61c add geo and map mappings 2014-06-12 14:12:24 -04:00
Lee Packham
8eb26b792b Fix all rspec tests so they run
For some reason these have been broken forever. Travis was failing,
correctly. I have updated the tests to be correct to how the code
actually works.

I would also suggest that if this is merged, we stop merging PRs that
have failed test runs. Tests matter in a module like this.
2014-06-10 22:10:00 +01:00
Dominic Luechinger
43a5e7d6ff Added nginx::resource::mailhost to be configured via hiera
There is a slight chance the SSL 'concat::fragment' of the mailhost and
virtualhost are get in the way, if the name is declared the same.
2014-04-08 00:36:36 +02:00
James Fryman
8173432d82 Merge pull request #266 from ese/master
Allow values to be hashes at prepend,append,custom cfg for locations
2014-03-19 09:54:17 -05:00
James Fryman
15506a5f98 Merge pull request #275 from gini/worker_rlimit_nofile
New parameter worker_rlimit_nofile
2014-03-17 12:54:07 -05:00
James Fryman
e59468a71f Merge pull request #264 from welterde/feature-service_disable
add service_ensure support
2014-03-17 12:29:02 -05:00
eSe
7e6794492e Fix tests 2014-03-13 12:27:50 +01:00
Daniel Kerwin
04b6c3dd7d Test worker_rlimit_nofile 2014-03-12 18:41:03 +01:00
eSe
2271ce5255 Fix indent for location parameters to 4 spaces 2014-03-12 17:18:05 +01:00
Daniel Black
5829559aca add hash/array support for upstream_cfg_prepend 2014-03-12 19:06:47 +11:00
Daniel Black
7e56183c00 remove arrays from keys 2014-03-12 18:21:15 +11:00
Zdenek Janda
58818b3a44 Ensure that vhosts are purged with new parameter purge_vhost 2014-03-07 22:18:10 +01:00
Daniel Black
a66cd98ea9 Merge https://github.com/ese/puppet-nginx into hash
Resolved Conflicts:
	spec/defines/resource_location_spec.rb
	templates/vhost/vhost_location_alias.erb
	templates/vhost/vhost_location_directory.erb
	templates/vhost/vhost_location_empty.erb
	templates/vhost/vhost_location_fastcgi.erb
	templates/vhost/vhost_location_proxy.erb
	templates/vhost/vhost_location_stub_status.erb
2014-03-08 01:20:58 +11:00
Daniel Black
04e34dce39 Key value parameter maps to take array as value
Allow arrays to be specified as values in location_cfg_{prepend,append} and
vhost_cfg_{ssl_,}{prepend,append} parameters.
2014-03-07 23:53:32 +11:00
eSe
e3f2b804d5 Added tests for hashes as values in location templates 2014-03-06 16:22:30 +01:00
Tassilo Schweyer
b2d586d758 remove duplicate ref to params in nginx::service 2014-03-04 17:46:45 +01:00
James Fryman
de428893f2 Merge pull request #249 from fadenb/bug/duplicate_listen_option_ipv6only
Bugfix for duplicate listen option caused by hardcoded `ipv6only=on` in template
2014-02-04 06:20:57 -08:00
Tristan Helmich
c78ebbfcd2 Update test to reflect modified template from #171 2014-02-03 14:36:06 +01:00
Tristan Helmich
4fb4129aa4 Update tests accroding to changed templates
Specs no longer require `ipv6only=on` in listen option when using user
supplied value since it is no longer hardcoded in the template.
2014-02-03 13:13:06 +01:00
Matthew Haughton
325ae7e6de test vhost name is sanitized 2014-01-18 13:31:05 -05:00
Matthew Haughton
dc3817f9ae added rewrite to location/proxy & vhost
With credit to https://github.com/OmarzT
2014-01-13 13:20:02 -05:00
Matthew Haughton
10a1691b9e validations for nginx::resource::mailhost 2014-01-07 23:16:54 -05:00
Matthew Haughton
d683fae9ff validations for nginx::resource::vhost 2014-01-07 23:16:52 -05:00
Matthew Haughton
8e71d33121 validations for nginx::resource::location 2014-01-07 23:04:49 -05:00
Matthew Haughton
d973000dfd Update tests broken by merging #203 2013-12-30 12:44:19 -05:00
Matthew Haughton
8bd2acb344 remove deprecated rspec-system-serverspec includes
See https://github.com/puppetlabs/rspec-system-serverspec/pull/11
2013-12-08 17:09:03 -05:00
Matthew Haughton
7d9d69c0bc add new compile matcher 2013-12-08 16:54:25 -05:00
Matthew Haughton
17baf0861c add relationship matchers 2013-12-08 16:54:25 -05:00
Matthew Haughton
fb46e3b8cb refactor nginx_spec 2013-12-08 16:54:25 -05:00
Matthew Haughton
58b5f52685 more stringent tests for config file resources 2013-12-08 16:54:25 -05:00
Matthew Haughton
26d904c946 use new 'without_content' matcher 2013-12-08 16:54:20 -05:00
Matthew Haughton
37c12b8cb4 use new count matchers in params class 2013-12-07 13:39:24 -05:00
Matthew Haughton
36319cd5e0 set default facts for all manifests 2013-12-07 13:39:24 -05:00
Matthew Haughton
db68cf39ae include_class is deprecated 2013-12-07 13:39:24 -05:00
James Fryman
7c1674202a Merge pull request #170 from TelekomCloud/feature/set_proxy_method_and_body
Add support for proxy method and body
2013-12-05 07:48:18 -08:00
Matthew Haughton
390b491cc1 ruby 1.8.7 syntax fix 2013-12-02 14:01:38 -05:00
Matthew Haughton
2ccd399a74 add tests to check file fragments are absent 2013-12-02 13:58:23 -05:00
Matthew Haughton
eb31df40d6 Remove vhost and mailhost vhost_autogen.conf
Don't generate it anymore, and remove any existing file from
people's systems
2013-11-30 21:24:55 -05:00
Matthew Haughton
d849c31c35 switch location resource to concat pattern 2013-11-30 21:24:55 -05:00
Matthew Haughton
753283286f switch vhost resource to concat pattern
Also uses sites-available/enabled pattern for config files
2013-11-30 21:24:50 -05:00
Matthew Haughton
2023ca1d6d switch mailhost resource to concat pattern 2013-11-30 21:21:40 -05:00
Matthew Haughton
2459844373 add puppetlabs-concat dependency 2013-11-30 20:33:10 -05:00
Matthew Haughton
9a39249e1a more coverage for rspec-system 2013-11-30 20:33:06 -05:00
Matthew Haughton
dd810866d0 add dummy (but valid) SSL cert/key
nginx won't start if it can't get OpenSSL to validate the key/cert combo
2013-11-30 19:11:12 -05:00
Matthew Haughton
0922eb7210 check for 0 or 2 exit code
See http://docs.puppetlabs.com/man/apply.html

puppet_apply from rspec-system-puppet runs with --detailed-exitcodes
2013-11-30 19:11:00 -05:00
Matthew Haughton
d2ec91da6e Don't include RSpecSystemPuppet::Helpers twice 2013-11-30 17:57:32 -05:00
Dominik Richter
aa611dc938 added specs for proxy_method and proxy_set_body
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2013-11-28 11:42:34 +01:00
Matthew Haughton
8292be0748 set required variables before template declared
correctly sets www_root in the vhost_header template
2013-11-21 23:23:45 -05:00
Matthew Haughton
43d628d4f0 fix auth_basic/auth_basic_user_file variable detection 2013-11-21 23:22:01 -05:00
Matthew Haughton
99e9d82f12 accept boolean for ipv6_enable as documented 2013-11-21 23:18:04 -05:00
Matthew Haughton
e1c4c7470b sort vhost_cfg_append in vhost_ssl_footer 2013-11-21 23:08:36 -05:00
Matthew Haughton
4af2087867 fix spacing issues in various templates
Before this change, vhost_ssl_header would merge
"ssl" with any listen options, e.g.:
    listen       *:443 ssldefault;
when listen_options => 'default'.
2013-11-21 23:04:39 -05:00
Matthew Haughton
c8d9ad5680 only ensure yum repo file when yum repo created 2013-11-21 22:40:05 -05:00
Matthew Haughton
ef2a5e4f15 fix syntax of allow/deny directives 2013-11-21 22:35:44 -05:00
Matthew Haughton
3024f2927d fix IPv6 address fact detection 2013-11-21 22:32:23 -05:00
Matthew Haughton
4204dc908b Revert "Update vhost.pp"
This reverts commit 5ee2f65.

Fixes #186
2013-11-21 22:23:44 -05:00
Matthew Haughton
962fa6672a rspec tests for v0.0.6
Resolves #65
2013-11-21 22:14:00 -05:00
Matthew Haughton
3959823171 check apt::source in catalog, not the file it creates
We should trust the apt module to do the right thing,
and just test that apt::source is part of the catalogue.
2013-10-20 21:54:32 -04:00
Matthew Haughton
0da2fa17ea apt modules relies on lsbdistcodename fact 2013-10-20 21:43:33 -04:00
Matthew Haughton
a24e160024 fix specs for PR #158 2013-10-20 21:28:15 -04:00
Matthew Haughton
ad8c66a065 fix specs to cater for PR #162 2013-10-20 21:27:15 -04:00
James Fryman
2df378ef05 Merge pull request #131 from apenney/allow-deny
location_allow and location_deny support.
2013-09-04 13:05:58 -07:00
James Fryman
4e7a4531aa Merge pull request #133 from apenney/system
Add basic rspec-system tests.
2013-09-04 13:04:37 -07:00
Ashley Penney
52e6aa49c7 Add basic rspec-system tests.
This adds some really basic system tests so that we can test that
various refactorings work correctly and make life easier for you
before submitting.
2013-09-04 15:11:36 -04:00
Ashley Penney
8ddc6f6ccf This commit allows you to set package_ensure in nginx and have that
trickle through to the package classes.  I've avoided making them
into paramaterized classes and we just refer directly back to the main
nginx namespace to get the variable.  Makes for a cleaner looking
module!
2013-09-04 13:29:30 -04:00
Ashley Penney
39bc3f16ac This commit addresses issue #49, the lack of ways to set allow and
deny rules within a location.
2013-09-04 13:04:28 -04:00
Joshua Hoblitt
8a1981f640 update nginx::package to select the package class by $::osfamily
There were some bugs in the existing $::operatingsystem based approach.

* amazon was it's own package set when it's properly part of $::osfamily ==
'redhat' as of facter >= 1.7.2

* gentoo was improperly part of the amazon package set; this patch removes
support for gentoo but it was broken anyways

modifications to nginx:📦:redhat were made as well

* it no longer tries to setup the nginx.org yumrepo for fedora as no packages
for fedora are currently provided

* amazon release numbers are inconsistent with EL.  Unknown
$::lsbmajdistrelease values are now mapped to 6 so it's no longer nessicary to
test for $::lsbmajdistrelease being undefined.  This logic will need to be
reworked after RHEL7.x is released.

* the url to the nginx repo was including $::operatingsystem in it but
nginx.org only has package dirs for 'rhel' & 'centos' which are presently
identical; the usage of the 'rhel' dir has been hardcoded.  This fixes broken
yum repo setup for all $::osfamily == 'redhat' platforms other than redhat and
centos.
2013-08-22 13:32:54 -07:00
Pan
6ca7a8bd38 Remove GeoIP in spec to fix the tests
The GeoIP package has been removed from c01a7a8280 but not in tests
2013-07-18 14:46:27 -07:00
Carlos Sanchez
a65355ef53 Add specs using puppetlabs_spec_helper and librarian-puppet 2013-06-05 18:35:34 +02:00
James Fryman
0fc86b96fc Removed spec folder
Removed spec folder from tree, as no internally written ruby tests are used in this module
2011-06-07 10:59:13 -05:00
James Fryman
3b036c95e5 20110524 Work Snapshot 2011-05-24 21:20:48 -05:00