Skip to content

Commit b825077

Browse files
committed
Review update
1 parent 51aa461 commit b825077

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

behave_framework/src/minifi_test_framework/containers/minifi_container.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
class MinifiContainer(Container):
2929
def __init__(self, container_name: str, test_context: MinifiTestContext):
3030
super().__init__(test_context.minifi_container_image, f"{container_name}-{test_context.scenario_id}", test_context.network)
31-
self.flow_config_str: str = ""
3231
self.flow_definition = FlowDefinition()
3332
self.properties: dict[str, str] = {}
3433
self.log_properties: dict[str, str] = {}

behave_framework/src/minifi_test_framework/minifi/processor.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020

2121
class Processor:
2222
def __init__(self, class_name: str, proc_name: str, scheduling_strategy: str = "TIMER_DRIVEN",
23-
scheduling_period: str = "1 sec", ):
23+
scheduling_period: str = "1 sec", penalization_period: str = "1 sec"):
2424
self.class_name = class_name
2525
self.id: str = str(uuid.uuid4())
2626
self.name = proc_name
2727
self.scheduling_strategy: str = scheduling_strategy
2828
self.scheduling_period: str = scheduling_period
29+
self.penalization_period: str = penalization_period
2930
self.properties: dict[str, str] = {}
3031
self.auto_terminated_relationships: list[str] = []
3132

@@ -46,6 +47,7 @@ def to_yaml_dict(self) -> dict:
4647
'class': self.class_name,
4748
'scheduling strategy': self.scheduling_strategy,
4849
'scheduling period': self.scheduling_period,
50+
'penalization period': self.penalization_period,
4951
}
5052
if self.auto_terminated_relationships:
5153
data['auto-terminated relationships list'] = self.auto_terminated_relationships

behave_framework/src/minifi_test_framework/steps/flow_building_steps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def step_impl(context: MinifiTestContext, property_name: str, processor_name: st
247247
processor.add_property(property_name, filtering)
248248

249249

250-
@given("the \"{property_name}\" properties of the {processor_name_one} and {processor_name_two} processors are set to the same random guid")
250+
@given("the \"{property_name}\" properties of the {processor_name_one} and {processor_name_two} processors are set to the same random UUID")
251251
def step_impl(context, property_name, processor_name_one, processor_name_two):
252252
uuid_str = str(uuid.uuid4())
253253
context.get_or_create_default_minifi_container().flow_definition.get_processor(processor_name_one).add_property(property_name, uuid_str)

extensions/splunk/tests/features/splunk.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Feature: Sending data to Splunk HEC using PutSplunkHTTP
2525
And PutSplunkHTTP is EVENT_DRIVEN
2626
And a QuerySplunkIndexingStatus processor
2727
And QuerySplunkIndexingStatus is EVENT_DRIVEN
28-
And the "Splunk Request Channel" properties of the PutSplunkHTTP and QuerySplunkIndexingStatus processors are set to the same random guid
28+
And the "Splunk Request Channel" properties of the PutSplunkHTTP and QuerySplunkIndexingStatus processors are set to the same random UUID
2929
And the "Source" property of the PutSplunkHTTP processor is set to "my-source"
3030
And the "Source Type" property of the PutSplunkHTTP processor is set to "my-source-type"
3131
And the "Host" property of the PutSplunkHTTP processor is set to "my-host"
@@ -45,7 +45,7 @@ Feature: Sending data to Splunk HEC using PutSplunkHTTP
4545
And PutFile's success relationship is auto-terminated
4646

4747
When the MiNiFi instance starts up
48-
Then a single file with the content "foobar" is placed in the "/tmp/output" directory in less than 120 seconds
48+
Then a single file with the content "foobar" is placed in the "/tmp/output" directory in less than 20 seconds
4949
And an event is registered in Splunk HEC with the content "foobar" with "my-source" set as source and "my-source-type" set as sourcetype and "my-host" set as host
5050

5151
Scenario: A MiNiFi instance transfers data to a Splunk HEC with SSL enabled
@@ -56,7 +56,7 @@ Feature: Sending data to Splunk HEC using PutSplunkHTTP
5656
And PutSplunkHTTP is EVENT_DRIVEN
5757
And a QuerySplunkIndexingStatus processor
5858
And QuerySplunkIndexingStatus is EVENT_DRIVEN
59-
And the "Splunk Request Channel" properties of the PutSplunkHTTP and QuerySplunkIndexingStatus processors are set to the same random guid
59+
And the "Splunk Request Channel" properties of the PutSplunkHTTP and QuerySplunkIndexingStatus processors are set to the same random UUID
6060
And the "Source" property of the PutSplunkHTTP processor is set to "my-source"
6161
And the "Source Type" property of the PutSplunkHTTP processor is set to "my-source-type"
6262
And the "Host" property of the PutSplunkHTTP processor is set to "my-host"
@@ -79,5 +79,5 @@ Feature: Sending data to Splunk HEC using PutSplunkHTTP
7979
And SSL is enabled for the Splunk HEC and the SSL context service is set up for PutSplunkHTTP and QuerySplunkIndexingStatus
8080

8181
When the MiNiFi instance starts up
82-
Then a single file with the content "foobar" is placed in the "/tmp/output" directory in less than 120 seconds
82+
Then a single file with the content "foobar" is placed in the "/tmp/output" directory in less than 20 seconds
8383
And an event is registered in Splunk HEC with the content "foobar" with "my-source" set as source and "my-source-type" set as sourcetype and "my-host" set as host

extensions/splunk/tests/features/steps/splunk_container.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ def __init__(self, test_context: MinifiTestContext):
4444

4545
splunk_cert, splunk_key = make_server_cert(self.container_name, test_context.root_ca_cert, test_context.root_ca_key)
4646
splunk_cert_content = crypto.dump_certificate(crypto.FILETYPE_PEM, splunk_cert)
47-
splunkt_key_content = crypto.dump_privatekey(crypto.FILETYPE_PEM, splunk_key)
47+
splunk_key_content = crypto.dump_privatekey(crypto.FILETYPE_PEM, splunk_key)
4848
root_ca_content = crypto.dump_certificate(crypto.FILETYPE_PEM, test_context.root_ca_cert)
49-
self.files.append(File("/opt/splunk/etc/auth/splunk_cert.pem", splunk_cert_content.decode() + splunkt_key_content.decode() + root_ca_content.decode(), permissions=0o644))
49+
self.files.append(File("/opt/splunk/etc/auth/splunk_cert.pem", splunk_cert_content.decode() + splunk_key_content.decode() + root_ca_content.decode(), permissions=0o644))
5050
self.files.append(File("/opt/splunk/etc/auth/root_ca.pem", root_ca_content.decode(), permissions=0o644))
5151

5252
def deploy(self):

0 commit comments

Comments
 (0)