Skip to content

Commit 5fa77d7

Browse files
committed
testing: fix some cops
1 parent b2675c0 commit 5fa77d7

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ Metrics/LineLength:
1616
Metrics/MethodLength:
1717
Enabled: false
1818

19+
Metrics/ParameterLists:
20+
Enabled: false
21+
1922
Style/AndOr:
2023
Enabled: false
2124

lib/puppet/provider/elastic_rest.rb

-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def metadata
2626
#
2727
# @return Net::HTTPResponse
2828
# rubocop:disable Metrics/CyclomaticComplexity
29-
# rubocop:disable Metrics/ParameterLists
3029
# rubocop:disable Metrics/PerceivedComplexity
3130
def self.rest(http, \
3231
req, \
@@ -61,7 +60,6 @@ def self.rest(http, \
6160
end
6261
end
6362
# rubocop:enable Metrics/CyclomaticComplexity
64-
# rubocop:enable Metrics/ParameterLists
6563
# rubocop:enable Metrics/PerceivedComplexity
6664

6765
# Helper to format a remote URL request for Elasticsearch which takes into
@@ -86,7 +84,6 @@ def self.format_uri(resource_path, property_flush = {})
8684
# @return Array
8785
# an array of Hashes representing the found API objects, whether they be
8886
# templates, pipelines, et cetera.
89-
# rubocop:disable Metrics/ParameterLists
9087
def self.api_objects(protocol = 'http', \
9188
validate_tls = true, \
9289
host = 'localhost', \
@@ -116,7 +113,6 @@ def self.api_objects(protocol = 'http', \
116113

117114
results
118115
end
119-
# rubocop:enable Metrics/ParameterLists
120116

121117
# Process the JSON response body
122118
def self.process_body(body)

spec/helpers/acceptance/tests/datadir_shared_examples.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
json = JSON.parse(response.body)['nodes'].values.first
3636
expect(
3737
json['settings']['path']['data']
38-
).to (datapaths.one? and v[:elasticsearch_major_version] <= 2) ? eq(datapaths.first) : contain_exactly(*datapaths)
38+
).to((datapaths.one? and v[:elasticsearch_major_version] <= 2) ? eq(datapaths.first) : contain_exactly(*datapaths))
3939
end
4040
end
4141
end

0 commit comments

Comments
 (0)