spl2-testing-framework 1.4.0__tar.gz → 1.5.1__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.4.0 → spl2_testing_framework-1.5.1}/PKG-INFO +10 -1
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/README.md +9 -1
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/pyproject.toml +12 -13
- spl2_testing_framework-1.5.1/spl2_testing_framework/__init__.py +13 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/conftest.py +16 -13
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/launch_remotely_spl2.py +11 -12
- spl2_testing_framework-1.5.1/spl2_testing_framework/logger_manager.py +25 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/single_spl2_file_runner.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/test_runner.py +11 -12
- spl2_testing_framework-1.5.1/spl2_testing_framework/tools/__init__.py +13 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/create_diff_sheet.py +11 -12
- spl2_testing_framework-1.5.1/spl2_testing_framework/tools/jobs/__init__.py +13 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/jobs/cli_job.py +22 -13
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/jobs/cloud_job.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/jobs/job.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/jobs/splunk_job.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/jobs/test_cloud_job.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/performance.py +104 -24
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/results.py +11 -12
- spl2_testing_framework-1.5.1/spl2_testing_framework/tools/search_clients/__init__.py +13 -0
- spl2_testing_framework-1.5.1/spl2_testing_framework/tools/search_clients/cli_search_client.py +109 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/search_clients/cloud_search_client.py +10 -25
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/search_clients/search_client.py +10 -25
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/search_clients/splunk_search_client.py +10 -25
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/spl2test_runner.py +48 -14
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/test_discovery.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/test_types.py +11 -12
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/tools/utils.py +11 -12
- spl2_testing_framework-1.4.0/spl2_testing_framework/__init__.py +0 -15
- spl2_testing_framework-1.4.0/spl2_testing_framework/logger_manager.py +0 -26
- spl2_testing_framework-1.4.0/spl2_testing_framework/tools/__init__.py +0 -15
- spl2_testing_framework-1.4.0/spl2_testing_framework/tools/jobs/__init__.py +0 -15
- spl2_testing_framework-1.4.0/spl2_testing_framework/tools/search_clients/__init__.py +0 -28
- spl2_testing_framework-1.4.0/spl2_testing_framework/tools/search_clients/cli_search_client.py +0 -87
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/LICENSE +0 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/pytest.ini.sample +0 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/spl2_test_config.json +0 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/spl2_utils/assertions.spl2 +0 -0
- {spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/spl2_utils/logs_to_metrics.spl2 +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: spl2-testing-framework
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.1
|
|
4
4
|
Summary: SPL2 Testing Framework
|
|
5
5
|
Home-page: https://github.com/splunk/spl2-testing-framework
|
|
6
6
|
Keywords: SPL2 testing framework
|
|
@@ -133,6 +133,7 @@ Additionally, the following options are supported:
|
|
|
133
133
|
* `--ignore_empty_strings` - to ignore empty strings in the results
|
|
134
134
|
* `--ignore_additional_fields_in_actual` - to ignore fields present in actual results but not in expected results (useful when actual results contain extra fields that should not affect comparison)
|
|
135
135
|
* `--create_comparison_sheet` - to create a comparison sheet in `comparison_box_test` folder using actual and expected outputs (works only when running box tests)
|
|
136
|
+
* `--cli_bench` - when running tests with CLI, this option enables benchmarking mode by adding `-b` and `-n` flags to the spl2-processor-cli command. The value specifies the number of events to test (e.g., `--cli_bench=1000` will add `-b -n 1000` to the CLI command). **In bench mode, all tests always succeed and CLI output is printed to logs** - this is useful for performance testing and benchmarking. This is only applicable when using `--type cli`.
|
|
136
137
|
|
|
137
138
|
Note: The `pytest.ini.sample` file allows you to define command parameters. Just update the configurations, rename the
|
|
138
139
|
file by removing the `.sample` extension, and execute the command.
|
|
@@ -204,3 +205,11 @@ Content of this file will also be printed to stdout.
|
|
|
204
205
|
|
|
205
206
|
This checks can be applied only to box tests, as assertions which are used in unit tests may impact spl2 pipeline
|
|
206
207
|
performance.
|
|
208
|
+
|
|
209
|
+
## Format all files
|
|
210
|
+
To format all files run:
|
|
211
|
+
|
|
212
|
+
```bash
|
|
213
|
+
black spl2_testing_framework tests
|
|
214
|
+
```
|
|
215
|
+
|
|
@@ -101,6 +101,7 @@ Additionally, the following options are supported:
|
|
|
101
101
|
* `--ignore_empty_strings` - to ignore empty strings in the results
|
|
102
102
|
* `--ignore_additional_fields_in_actual` - to ignore fields present in actual results but not in expected results (useful when actual results contain extra fields that should not affect comparison)
|
|
103
103
|
* `--create_comparison_sheet` - to create a comparison sheet in `comparison_box_test` folder using actual and expected outputs (works only when running box tests)
|
|
104
|
+
* `--cli_bench` - when running tests with CLI, this option enables benchmarking mode by adding `-b` and `-n` flags to the spl2-processor-cli command. The value specifies the number of events to test (e.g., `--cli_bench=1000` will add `-b -n 1000` to the CLI command). **In bench mode, all tests always succeed and CLI output is printed to logs** - this is useful for performance testing and benchmarking. This is only applicable when using `--type cli`.
|
|
104
105
|
|
|
105
106
|
Note: The `pytest.ini.sample` file allows you to define command parameters. Just update the configurations, rename the
|
|
106
107
|
file by removing the `.sample` extension, and execute the command.
|
|
@@ -171,4 +172,11 @@ command ("|")
|
|
|
171
172
|
Content of this file will also be printed to stdout.
|
|
172
173
|
|
|
173
174
|
This checks can be applied only to box tests, as assertions which are used in unit tests may impact spl2 pipeline
|
|
174
|
-
performance.
|
|
175
|
+
performance.
|
|
176
|
+
|
|
177
|
+
## Format all files
|
|
178
|
+
To format all files run:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
black spl2_testing_framework tests
|
|
182
|
+
```
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
[tool.poetry]
|
|
18
17
|
name = "spl2-testing-framework"
|
|
19
|
-
version = "1.
|
|
18
|
+
version = "1.5.1"
|
|
20
19
|
description = "SPL2 Testing Framework"
|
|
21
20
|
authors = ["mgazda-splunk <mgazda@splunk.com>"]
|
|
22
21
|
readme = "README.md"
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
{spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/conftest.py
RENAMED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
import json
|
|
18
17
|
import os
|
|
@@ -53,6 +52,7 @@ PERFORMANCE_CHECK = "performance_check"
|
|
|
53
52
|
TEST_TYPE = "type"
|
|
54
53
|
TEST_DIR = "test_dir"
|
|
55
54
|
LIMIT_TESTS = "limit_tests"
|
|
55
|
+
CLI_BENCH = "cli_bench"
|
|
56
56
|
|
|
57
57
|
import logging
|
|
58
58
|
|
|
@@ -79,6 +79,7 @@ def pytest_addoption(parser):
|
|
|
79
79
|
parser.addoption(f"--{IGNORE_EMPTY_STRINGS}", action="store_true")
|
|
80
80
|
parser.addoption(f"--{IGNORE_ADDITIONAL_FIELDS_IN_ACTUAL}", action="store_true")
|
|
81
81
|
parser.addoption(f"--{LIMIT_TESTS}", action="store", type=int, default=None)
|
|
82
|
+
parser.addoption(f"--{CLI_BENCH}", action="store", type=int, default=None)
|
|
82
83
|
|
|
83
84
|
|
|
84
85
|
def pytest_generate_tests(metafunc):
|
|
@@ -147,7 +148,8 @@ def spl2_test_runner(
|
|
|
147
148
|
url = f"{config['host']}:{config['port']}"
|
|
148
149
|
search_client = SplunkSearchClient(url=url, auth=basic_authentication)
|
|
149
150
|
elif test_type == "cli":
|
|
150
|
-
|
|
151
|
+
cli_bench = run_configurations.get(CLI_BENCH)
|
|
152
|
+
search_client = CLISearchClient(cli_bench=cli_bench)
|
|
151
153
|
elif test_type == "cloud":
|
|
152
154
|
url = f"https://{config['tenant']}.api.{config['cloud_instance']}/{config['tenant']}"
|
|
153
155
|
search_client = CloudSearchClient(url=url, auth=bearer_token_authentication)
|
|
@@ -169,6 +171,7 @@ def run_configurations(request):
|
|
|
169
171
|
CREATE_COMPARISON_SHEET: request.config.getoption(
|
|
170
172
|
f"--{CREATE_COMPARISON_SHEET}"
|
|
171
173
|
),
|
|
174
|
+
CLI_BENCH: request.config.getoption(f"--{CLI_BENCH}"),
|
|
172
175
|
}
|
|
173
176
|
|
|
174
177
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
import argparse
|
|
18
17
|
import json
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import logging
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def setup_logging():
|
|
20
|
+
logging.basicConfig(
|
|
21
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
|
22
|
+
handlers=[
|
|
23
|
+
logging.FileHandler("spl2_testing_framework.log"),
|
|
24
|
+
],
|
|
25
|
+
)
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
import argparse
|
|
18
17
|
import logging
|
{spl2_testing_framework-1.4.0 → spl2_testing_framework-1.5.1}/spl2_testing_framework/test_runner.py
RENAMED
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
import argparse
|
|
18
17
|
import sys
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
import pandas as pd
|
|
18
17
|
from openpyxl import load_workbook
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
from .job import Job
|
|
18
17
|
|
|
@@ -51,10 +50,16 @@ class CLISimpleJob(Job):
|
|
|
51
50
|
"""A job that is executed on CLI in box tests."""
|
|
52
51
|
|
|
53
52
|
def __init__(
|
|
54
|
-
self,
|
|
53
|
+
self,
|
|
54
|
+
source: str,
|
|
55
|
+
code_module_name: str,
|
|
56
|
+
code_module_content,
|
|
57
|
+
test_name,
|
|
58
|
+
cli_bench=None,
|
|
55
59
|
):
|
|
56
60
|
code_module_content += f"\n$source = from {str(source)};"
|
|
57
61
|
super().__init__("", code_module_name, code_module_content, test_name)
|
|
62
|
+
self.cli_bench = cli_bench
|
|
58
63
|
|
|
59
64
|
def create(self) -> "CLISimpleJob":
|
|
60
65
|
"""Creates a job. To run the job use run_job() method."""
|
|
@@ -62,6 +67,10 @@ class CLISimpleJob(Job):
|
|
|
62
67
|
cli = "spl2-processor-cli"
|
|
63
68
|
command = [cli, "test", "-s", "pipeline"]
|
|
64
69
|
|
|
70
|
+
# Add bench parameters if cli_bench is specified
|
|
71
|
+
if self.cli_bench is not None:
|
|
72
|
+
command.extend(["-b", "-n", str(self.cli_bench)])
|
|
73
|
+
|
|
65
74
|
input_data = "\n\n".join(
|
|
66
75
|
[
|
|
67
76
|
self.commands_module,
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
from requests import Response
|
|
18
17
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
from requests import Response
|
|
18
17
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
from requests import Response
|
|
18
17
|
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
+
# Copyright 2026 Splunk Inc.
|
|
1
2
|
#
|
|
2
|
-
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
3
6
|
#
|
|
4
|
-
#
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
15
8
|
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
16
15
|
|
|
17
16
|
import unittest
|
|
18
17
|
from unittest.mock import MagicMock
|