Ejemplo n.º 1
0
 def test_override_output_location(self):
     self.setup_environment()
     config = SidecarConfig({"sidecar.output-location": "stdout"})
     self.assertEqual(self.all_expected_tags(), config.common_tags())
     self.assertEqual("stdout", config.output_location())
     self.clear_environment()
Ejemplo n.º 2
0
 def test_default_sidecar_config(self):
     self.setup_environment()
     config = SidecarConfig()
     self.assertEqual(self.all_expected_tags(), config.common_tags())
     self.assertEqual(self.default_location, config.output_location())
     self.clear_environment()
Ejemplo n.º 3
0
 def test_override_common_tags(self):
     self.setup_environment()
     config = SidecarConfig({"sidecar.common-tags": {"nf.app": "foo"}})
     self.assertEqual({"nf.app": "foo"}, config.common_tags())
     self.assertEqual(self.default_location, config.output_location())
     self.clear_environment()
Ejemplo n.º 4
0
 def __init__(self, clock: Clock = SystemClock(),
              config: SidecarConfig = SidecarConfig()) -> None:
     self._clock = clock
     self._common_tags = config.common_tags()
     self._writer = SidecarWriter.create(config.output_location())