From d369135c4897aa38b9e47010957cc660e886ae93 Mon Sep 17 00:00:00 2001 From: Joshua Vecsei Date: Thu, 24 Aug 2023 11:17:28 +0200 Subject: [PATCH] added template test for 'enable-container-network-metrics' --- spec/jobs/garden_spec.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/jobs/garden_spec.rb b/spec/jobs/garden_spec.rb index 4b801465..1eba2f05 100644 --- a/spec/jobs/garden_spec.rb +++ b/spec/jobs/garden_spec.rb @@ -218,6 +218,24 @@ it 'sets the time-format' do expect(rendered_template['server']['time-format']).to eql('unix-epoch') end + + it 'does not enable the container network metrics' do + expect(rendered_template['server']['enable-container-network-metrics']).to eql(nil) + end + + context 'when container network metrics are enabled' do + let(:properties) { + { + 'garden' => { + 'enable_container_network_metrics' => true, + } + } + } + + it 'sets the enable container network metrics to true' do + expect(rendered_template['server']['enable-container-network-metrics']).to eql(true) + end + end end context 'with a listen address' do