Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: constanca <[email protected]>
  • Loading branch information
constanca-m committed May 29, 2024
1 parent f3df0e6 commit e98c561
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions share/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ def add_output(self, output_type: str, **kwargs: Any) -> None:
# for the same url/cloud_id for both types logstash or elasticsearch
raise ValueError(f"Duplicated output destination {output_dest} for type {output_type}")

output: Optional[Output] = None
if output_type == "elasticsearch":
output = ElasticsearchOutput(**kwargs)
elif output_type == "logstash":
Expand Down
6 changes: 3 additions & 3 deletions tests/handlers/aws/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def test_get_shipper_from_input(self) -> None:
assert isinstance(shipper._shippers[0], LogstashShipper)

with self.subTest("Logstash shipper from each input"):
config_yaml_cw: str = """
config_yaml_cw = """
inputs:
- type: cloudwatch-logs
id: arn:aws:logs:eu-central-1:123456789:stream/test-cw-logs
Expand Down Expand Up @@ -273,7 +273,7 @@ def test_get_shipper_from_input(self) -> None:
event_input_kinesis.delete_output_by_destination("logstash_url")

with self.subTest("Two Logstash shippers from Cloudwatch logs input"):
config_yaml_cw: str = """
config_yaml_cw = """
inputs:
- type: cloudwatch-logs
id: arn:aws:logs:eu-central-1:123456789:stream/test-cw-logs
Expand All @@ -296,7 +296,7 @@ def test_get_shipper_from_input(self) -> None:
event_input.delete_output_by_destination("logstash_url-2")

with self.subTest("Two outputs with the same logstash_url"):
config_yaml_cw: str = """
config_yaml_cw = """
inputs:
- type: cloudwatch-logs
id: arn:aws:logs:eu-central-1:123456789:stream/test-cw-logs
Expand Down

0 comments on commit e98c561

Please sign in to comment.