From 3b7ea055488a750381b8a402f787e719a3166d6d Mon Sep 17 00:00:00 2001 From: Luke Bigum Date: Thu, 21 Dec 2017 12:18:55 +0000 Subject: [PATCH] Remove limitation on http max-row-limit, + lint and spec fixes. --- Gemfile | 27 ++++++++++++++------------- manifests/init.pp | 12 ++++++------ manifests/params.pp | 2 +- spec/classes/config_spec.rb | 2 +- spec/classes/init_spec.rb | 2 -- 5 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Gemfile b/Gemfile index b737ab3..27da415 100644 --- a/Gemfile +++ b/Gemfile @@ -18,19 +18,20 @@ else end group :development, :test do - gem 'rake', require: false - gem 'rspec', require: false - gem 'rspec-puppet', require: false - gem 'puppetlabs_spec_helper', require: false - gem 'puppet-lint', require: false - gem 'simplecov', require: false - gem 'puppet_facts', require: false - gem 'json_pure', '~> 1.8', require: false - gem 'json', require: false - gem 'metadata-json-lint', require: false - gem 'rspec-puppet-facts', require: false - gem 'rubocop', '~> 0.47.0', require: false if RUBY_VERSION >= '2.3.0' - gem 'rubocop-rspec', '~> 1.10.0', require: false if RUBY_VERSION >= '2.3.0' + gem 'rake', require: false + gem 'rspec', require: false + gem 'rspec-puppet', require: false + gem 'puppetlabs_spec_helper', require: false + gem 'puppet-lint', require: false + gem 'simplecov', require: false + gem 'puppet_facts', require: false + gem 'json_pure', '~> 1.8', require: false + gem 'json', require: false + gem 'rspec-puppet-facts', require: false + gem 'metadata-json-lint', '1.2.2', require: false if RUBY_VERSION.to_f == 2.1 + gem 'metadata-json-lint', '1.1.0', require: false if RUBY_VERSION.to_f <= 1.9 + gem 'rubocop', '~> 0.47.0', require: false if RUBY_VERSION >= '2.3.0' + gem 'rubocop-rspec', '~> 1.10.0', require: false if RUBY_VERSION >= '2.3.0' end group :system_tests do diff --git a/manifests/init.pp b/manifests/init.pp index e68f59b..d896922 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -38,10 +38,10 @@ $manage_repos = $influxdb::params::manage_repos, ) inherits influxdb::params { - anchor { 'influxdb::start': } -> - class { 'influxdb::install': } -> - class { 'influxdb::config': } -> - class { 'influxdb::service': } -> - anchor { 'influxdb::end': } - + contain ::influxdb::install + contain ::influxdb::config + contain ::influxdb::service + Class[::influxdb::install] + -> Class[::influxdb::config] + -> Class[::influxdb::service] } diff --git a/manifests/params.pp b/manifests/params.pp index ef5249e..a9c5224 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -88,7 +88,7 @@ 'https-certificate' => '/etc/ssl/influxdb.pem', 'https-private-key' => '', 'shared-sercret' => '', - 'max-row-limit' => 10000, + 'max-row-limit' => 0, 'max-connection-limit' => 0, 'unix-socket-enabled' => false, 'bind-socket' => '/var/run/influxdb.sock', diff --git a/spec/classes/config_spec.rb b/spec/classes/config_spec.rb index c12f600..7218423 100644 --- a/spec/classes/config_spec.rb +++ b/spec/classes/config_spec.rb @@ -102,7 +102,7 @@ class { 'influxdb': 'https-certificate' => esc_regex('"/etc/ssl/influxdb.pem"'), 'https-private-key' => '', 'shared-sercret' => '', - 'max-row-limit' => 10_000, + 'max-row-limit' => 0, 'max-connection-limit' => 0, 'unix-socket-enabled' => false, 'bind-socket' => esc_regex('"/var/run/influxdb.sock"') diff --git a/spec/classes/init_spec.rb b/spec/classes/init_spec.rb index 6b7b93a..2e711a6 100644 --- a/spec/classes/init_spec.rb +++ b/spec/classes/init_spec.rb @@ -6,13 +6,11 @@ let(:facts) { facts } describe 'with default params' do - it { is_expected.to contain_anchor('influxdb::start') } it { is_expected.to contain_class('influxdb::params') } it { is_expected.to contain_class('influxdb') } it { is_expected.to contain_class('influxdb::install') } it { is_expected.to contain_class('influxdb::config') } it { is_expected.to contain_class('influxdb::service') } - it { is_expected.to contain_anchor('influxdb::end') } it { is_expected.to compile.with_all_deps } end