Commit graph

73 commits

Author SHA1 Message Date
pjoshi
955cdc7aac typo corrected 2015-12-04 09:17:48 +05:30
pjoshi
2be9096e34 removed configtest command 2015-12-03 18:37:58 +05:30
pjoshi
914f92a49a restart relaced with reload in service_spec.rb file 2015-12-03 13:56:07 +05:30
Phil Friderici
c849c2cb7d Add parameter to allow setting error_log severity level 2015-11-01 13:14:08 +00:00
Matthew Haughton
35577ccc88 add remaining gzip directives
Closes #367
2015-07-11 17:07:56 -04:00
John Daniels
310ed828c2 Adjusted tests for proxy variables. 2015-06-15 10:03:27 -04:00
Geoff Garside
27334c1bd4 Manage the nginx log directory.
Ensure the nginx::config::log_dir exists so that the access.log and error.log can be created. Also any nginx::vhost also put their access/error logs in this directory as well. This is done so that on platforms where /var/log/nginx is not created by package installation it exists so that nginx can startup and create the log files.

When vhost purge is enabled the log directory will not be touched and the log files will remain.
2015-06-03 20:43:52 +01:00
Matthew Haughton
8fc4044162 spec: add some more nginx.conf tests 2015-05-08 08:36:42 -04:00
Matthew Haughton
6062ecec5c package/debian: support puppetlabs-apt 2.0.0
puppetlabs-apt 2.0.0 drops support in apt::source for key_source and required_packages.

* key_source will default to keyserver.ubuntu.com which carries both keys, so it
  doesn't need to be explicitly defined
* required_packages can be emulated with the package resource
2015-04-21 22:08:53 -04:00
Matthew Haughton
0cd258b310 Merge pull request #590 from 3flex/540-refine-worker_processes-validation
config: refined worker_processes validation
2015-04-10 12:00:44 -04:00
Matthew Haughton
810d36d3a8 config: refined worker_processes validation
Closes #540
2015-04-01 23:34:31 -04:00
Matthew Haughton
faa974b745 spec/Gemfile: switch to rspec-puppet 2
The big win is that it's now possible to test the future parser with the
latest Puppet release. In the past it wasn't possible to test future parser
with anything higher than 3.5.x.
2015-03-30 23:39:50 -04:00
Erik R. Rygg
b8c2f44aa1 One more update to the spec test 2015-03-24 12:28:46 -06:00
Erik R. Rygg
493e5c3eec Add key for passenger and update spec tests 2015-03-24 11:51:52 -06:00
Sebastien Badia
5f1da4fce9 apt:🔑 puppetlabs-apt check now the full GPG fingerprints.
Since commit 531ef9 of puppetlabs-apt, the gpg key (apt::key) is
checked, and should use the long format.

This value is validated with a regex enforcing it to only contain valid
hexadecimal characters, be precisely 8 or 16 hexadecimal characters long
and optionally prefixed with 0x for key IDs, or 40 hexadecimal
characters long for key fingerprints.

f588f2651a
2015-03-19 15:34:42 +01:00
Prachetas Prabhu
409f8ef4e3 Adds rspec tests for nginx_cfg_prepend 2015-03-04 23:55:30 +00:00
Matthew Haughton
1ae85c522c Merge pull request #534 from 3flex/configurable_service_name
Configurable service name
2014-12-19 23:34:22 -05:00
Matthew Haughton
be30b57531 Merge pull request #531 from ckaenzig/optional-proxy-http-version
Allow disabling proxy_http_version directive
2014-12-18 10:08:52 -05:00
Christian Kaenzig
6a4e4b4e73 Disable proxy_http_version directive by default
The default value in nginx::config was the same as nginx's default,
so it's not necessary to be set in any version of nginx unless one
needs a specific value. This also allows us to use undef when we don't
want the directive to be set instead of false.

Also added a test for the default case.
2014-12-18 11:22:44 +01:00
Barhob
c1cb58f6f1 add configurable service name 2014-12-17 23:45:44 -05:00
Matthew Haughton
bbbb1ca130 Merge pull request #519 from 3flex/refactor-packages
Clean up package classes, allow installing mainline upstream packages
2014-12-14 21:25:56 -05:00
Sergio Ballesteros
1e3bf2fe88 Added test: arrays as values in http_cfg_append 2014-12-11 16:41:47 +01:00
Matthew Haughton
89b7480bfe package: mainline package support on redhat/debian
Closes #450
Closes #456
Closes #518
2014-12-10 21:23:04 -05:00
Matthew Haughton
1da7ffa6c1 package/redhat: don't ensure the yum repo file
The file wouldn't necessarily be at that location. According to Puppet it's installed in the first matching location:
* Custom directory specified by the ‘/etc/yum.conf’ reposdir property
* ‘/etc/yum/repos.d’
* ‘/etc/yum.repos.d’
* If none of these locations match, section will be created in ‘/etc/yum.conf’
2014-12-10 21:23:04 -05:00
Matthew Haughton
d16222d940 package: Differentiate between upstream's RedHat and CentOS packages
Even if they're currently identical they may diverge in future.
2014-12-10 21:23:04 -05:00
Matthew Haughton
029f73f4a2 package: removed a warning for Fedora 18 and below
Those versions no longer supported by the Fedora Project.
2014-12-10 21:23:04 -05:00
Matthew Haughton
4eea8c7397 package: install "nginx" package when OS isn't recognized
This will provide broader OS compatibility without having to manually add
support for specific OSes.
2014-12-10 21:23:01 -05:00
Matthew Haughton
1a10a23c1b package: don't install upstream package on Amazon Linux
Upstream doesn't provide a build of Nginx for Amazon Linux.
2014-12-09 21:49:40 -05:00
Matthew Haughton
1898182c6d spec: cleanup
* Removed some tests that no longer apply and/or are redundant
* Only set OS facts when testing OS-specific behaviors. This simplifies the
  facts that must be set in the specs and saves running the same tests
  several times when the results wouldn't differ by OS anyway.
2014-12-09 19:47:05 -05:00
Matthew Haughton
9647d1278f add negative test for log_format 2014-12-03 23:26:19 -05:00
Joshua B. Bussdieker
2e221a7e0f Support specifying log formats 2014-12-03 23:26:10 -05:00
Matthew Haughton
00ec3f4e35 spec fixes 2014-09-21 01:27:35 -04:00
James Fryman
4c5f1e3b2a pass one of spec cleanup 2014-09-20 18:25:24 -05:00
James Fryman
d11d574e8c Merge pull request #443 from rabbitt/whitespace-cleanup
cleanup whitespace and key/value alignment in config files
2014-09-20 10:06:59 -05:00
Frederik Wagner
ad391f67bf added nginx_vhosts_defaults parameter hash 2014-09-15 23:11:26 -04:00
Carl P. Corliss
fb880576a6 cleanup resultant whitespace and key/value alignment in config files
- fix tests related to whitespace changes
2014-09-13 04:13:18 -04:00
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
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
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
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
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
Robin Gloster
dc1b4b528c fix tests 2014-06-20 16:35:23 +02: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
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
Daniel Kerwin
04b6c3dd7d Test worker_rlimit_nofile 2014-03-12 18:41:03 +01:00