spl2-testing-framework 1.7.1__tar.gz → 1.7.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/PKG-INFO +1 -1
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/pyproject.toml +1 -1
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/utils.py +22 -9
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/LICENSE +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/README.md +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/__init__.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/conftest.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/launch_remotely_spl2.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/logger_manager.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/pytest.ini.sample +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/single_spl2_file_runner.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/spl2_test_config.json +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/spl2_utils/assertions.spl2 +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/spl2_utils/logs_to_metrics.spl2 +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/test_runner.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/__init__.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/create_diff_sheet.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/jobs/__init__.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/jobs/cli_job.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/jobs/cloud_job.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/jobs/job.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/jobs/splunk_job.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/jobs/test_cloud_job.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/performance.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/results.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/search_clients/__init__.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/search_clients/cli_search_client.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/search_clients/cloud_search_client.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/search_clients/search_client.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/search_clients/splunk_search_client.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/spl2test_runner.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/splunk_integration/__init__.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/splunk_integration/splunk_handler.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/test_discovery.py +0 -0
- {spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/test_types.py +0 -0
{spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/tools/utils.py
RENAMED
|
@@ -95,19 +95,32 @@ def validate_compatibility(actual, expected):
|
|
|
95
95
|
assert not_extracted == {}
|
|
96
96
|
|
|
97
97
|
|
|
98
|
+
_QUOTED_STRING_OR_BARE_KEY = re.compile(
|
|
99
|
+
r'"(?:[^"\\]|\\.)*"' r"|" r"([{,])\s*([A-Za-z_]+)\s*(:)"
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def _quote_unquoted_keys(input_str):
|
|
104
|
+
"""Wrap bare (unquoted) object keys in double quotes to produce valid JSON,
|
|
105
|
+
without corrupting content inside JSON string values.
|
|
106
|
+
|
|
107
|
+
Uses regex alternation: the first branch consumes quoted strings (so their
|
|
108
|
+
content is never touched), the second branch captures bare keys to quote.
|
|
109
|
+
"""
|
|
110
|
+
|
|
111
|
+
def _replacer(m):
|
|
112
|
+
if m.group(1) is None:
|
|
113
|
+
return m.group(0)
|
|
114
|
+
return f'{m.group(1)}"{m.group(2)}":'
|
|
115
|
+
|
|
116
|
+
return _QUOTED_STRING_OR_BARE_KEY.sub(_replacer, input_str)
|
|
117
|
+
|
|
118
|
+
|
|
98
119
|
def parse_raw_from_input(input_str):
|
|
99
120
|
"""Parse SPL2-style or JSON array of events and return list of _raw field values.
|
|
100
121
|
Handles unquoted keys (e.g. {_raw: "x"}) by converting them to JSON-quoted keys.
|
|
101
122
|
"""
|
|
102
|
-
|
|
103
|
-
key_pattern = re.compile(
|
|
104
|
-
r"(\{|,)\s*(_raw|source|sourcetype|host)\s*:", re.MULTILINE
|
|
105
|
-
)
|
|
106
|
-
|
|
107
|
-
def quote_key(match):
|
|
108
|
-
return f'{match.group(1)}"{match.group(2)}":'
|
|
109
|
-
|
|
110
|
-
normalized = key_pattern.sub(quote_key, input_str)
|
|
123
|
+
normalized = _quote_unquoted_keys(input_str)
|
|
111
124
|
try:
|
|
112
125
|
parsed = json.loads(normalized)
|
|
113
126
|
except json.JSONDecodeError:
|
|
File without changes
|
|
File without changes
|
{spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/__init__.py
RENAMED
|
File without changes
|
{spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/conftest.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{spl2_testing_framework-1.7.1 → spl2_testing_framework-1.7.2}/spl2_testing_framework/test_runner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|