Skip to content

Commit

Permalink
prevent double negatives
Browse files Browse the repository at this point in the history
  • Loading branch information
kathap committed Jan 18, 2024
1 parent ffab5a4 commit 06d4479
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/cloud_controller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ staging:

statsd_host: "127.0.0.1"
statsd_port: 8125
disable_statsd_metrics: false
enable_statsd_metrics: true

perform_blob_cleanup: false

Expand Down
2 changes: 1 addition & 1 deletion lib/cloud_controller/config_schemas/base/api_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class ApiSchema < VCAP::Config

statsd_host: String,
statsd_port: Integer,
optional(:disable_statsd_metrics) => bool,
optional(:enable_statsd_metrics) => bool,
system_hostnames: [String],
default_app_ssh_access: bool,

Expand Down
2 changes: 1 addition & 1 deletion lib/cloud_controller/config_schemas/base/clock_schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ class ClockSchema < VCAP::Config

statsd_host: String,
statsd_port: Integer,
optional(:disable_statsd_metrics) => bool,
optional(:enable_statsd_metrics) => bool,

max_labels_per_resource: Integer,
max_annotations_per_resource: Integer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class DeploymentUpdaterSchema < VCAP::Config

statsd_host: String,
statsd_port: Integer,
optional(:disable_statsd_metrics) => bool,
optional(:enable_statsd_metrics) => bool,

max_labels_per_resource: Integer,
max_annotations_per_resource: Integer,
Expand Down
2 changes: 1 addition & 1 deletion lib/cloud_controller/dependency_locator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def statsd_client
@dependencies[:statsd_client]
else
config = CloudController::DependencyLocator.instance.config
if config.get(:disable_statsd_metrics) == false
if config.get(:enable_statsd_metrics) == true
Statsd.logger = Steno.logger('statsd.client')
register(:statsd_client, Statsd.new(config.get(:statsd_host), config.get(:statsd_port)))
else
Expand Down
2 changes: 1 addition & 1 deletion spec/fixtures/config/port_8181_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ droplets:

statsd_host: "127.0.0.1"
statsd_port: 8125
disable_statsd_metrics: false
enable_statsd_metrics: true

perform_blob_cleanup: false

Expand Down
2 changes: 1 addition & 1 deletion spec/unit/lib/cloud_controller/dependency_locator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@
TestConfig.override(
statsd_host: host,
statsd_port: port,
disable_statsd_metrics: true
enable_statsd_metrics: false
)

expected_client = double(CloudController::NullStatsdClient)
Expand Down

0 comments on commit 06d4479

Please sign in to comment.