Skip to content

Commit a56e9d1

Browse files
author
Artem Rys
authored
feat: remove splunk-appinspect dependency (#499)
* feat: remove splunk-appinspect dependency (#464) BREAKING CHANGE: eventgen.conf is not supported anymore, please migrate to pytest-splunk-addon-data.conf * refactor: use conf-parser in EventtypeParser instead of splunk-appinspect * refactor: use conf-parser in SavedsearchesParser instead of splunk-appinspect * refactor: use conf-parser in TransformsParser instead of splunk-appinspect * refactor: use conf-parser in PropsParser instead of splunk-appinspect * refactor: remove splunk-appinspect from AddonParser * docs: remove splunk-appinspect mentions from PropsParser * test: empty stanza in savedsearches.conf * refactor: use new EventtypeParser in cim_field_report * refactor: use conf-parser in eventgen.conf parser * chore: remove create_new_eventgen * feat: remove splunk_appinspect dependency * chore: rename to pytest_splunk_addon_data * chore: style the docs pagee * ci: restructure tests * ci: not run tests with Splunk 8.0 * refactor: move some public methods to be private * ci: add debug-statements to pre-commit configuration * docs: remove release_history page * ci: upload coverage to codecov * chore: remove all eventgen signs
1 parent 23deab5 commit a56e9d1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1123
-2970
lines changed

.github/workflows/build-test-release.yml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,15 @@ jobs:
180180
181181
test-splunk-matrix:
182182
name: Test Matrix
183+
needs:
184+
- pre-commit
185+
- compliance-dependencies
186+
- compliance-copyrights
187+
- test-splunk-external
188+
- test-splunk-doc
189+
- test-splunk-unit
190+
- review_secrets
191+
- review-dog-misspell
183192
runs-on: ubuntu-latest
184193
strategy:
185194
fail-fast: false
@@ -213,25 +222,20 @@ jobs:
213222
curl -sSL https://install.python-poetry.org | python3 -
214223
poetry install
215224
poetry run coverage run --source=./pytest_splunk_addon/standard_lib -m pytest -v tests/unit
216-
poetry run coverage html
217-
- name: Archive test coverage results
218-
uses: actions/upload-artifact@v2
225+
poetry run coverage xml
226+
- name: Upload coverage to Codecov
227+
uses: codecov/codecov-action@v2
219228
with:
220-
name: code-coverage-report-unit-tests
221-
path: htmlcov
222-
229+
token: ${{ secrets.CODECOV_TOKEN }}
230+
files: ./coverage.xml
231+
directory: ./coverage/reports/
232+
env_vars: OS,PYTHON
233+
fail_ci_if_error: true
234+
verbose: true
223235
publish:
224236
name: publish
225237
needs:
226-
- pre-commit
227-
- compliance-dependencies
228-
- compliance-copyrights
229-
- test-splunk-external
230-
- test-splunk-doc
231238
- test-splunk-matrix
232-
- test-splunk-unit
233-
- review_secrets
234-
- review-dog-misspell
235239
runs-on: ubuntu-latest
236240
steps:
237241
- uses: actions/checkout@v2

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ repos:
1818
rev: v4.1.0
1919
hooks:
2020
- id: check-merge-conflict
21+
- id: debug-statements
2122
- repo: https://github.com/psf/black
2223
rev: 21.12b0
2324
hooks:

README.rst

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,11 @@ Developing
4242

4343
Note: Must install docker desktop, vscode or pycharm pro optional
4444

45-
Note2: Appinspect requires libmagic verify this has been installed correctly each time a new workstation/vm is used https://dev.splunk.com/enterprise/docs/releaseapps/appinspect/splunkappinspectclitool/installappinspect
46-
4745
.. code:: bash
4846
4947
$ git clone --recurse-submodules -j8 [email protected]:splunk/pytest-splunk-addon.git
5048
51-
$ #setup python venv must be 3.7
49+
$ #setup python venv must be 3.7
5250
$ /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m venv .venv
5351
5452
$ source .venv/bin/activate
@@ -57,8 +55,6 @@ Note2: Appinspect requires libmagic verify this has been installed correctly eac
5755
5856
$ pip3 install -r requirements.txt
5957
60-
$ pip3 install https://download.splunk.com/misc/appinspect/splunk-appinspect-latest.tar.gz
61-
6258
$ python setup.py develop
6359
6460

docs/api_reference/sample_generation.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
DataGenerator
22
------------------
33

4-
EventgenParser
5-
~~~~~~~~~~~~~~~~~~
6-
.. automodule:: standard_lib.sample_generation.eventgen_parser
4+
PytestSplunkAddonDataParser
5+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
6+
.. automodule:: standard_lib.sample_generation.pytest_splunk_addon_data_parser
77
:members:
88
:show-inheritance:
99

docs/generate_conf.rst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ Generate Conf Utility
44
.. _generate_conf:
55

66
Overview
7-
""""""""""
7+
""""""""
8+
9+
.. note::
10+
11+
This is deprecated since `pytest-splunk-addon` v1.12.0 and latest available version is v1.11.4.
812

913
* The utility helps in creating the `pytest-splunk-addon-data.conf` from the existing `eventgen.conf` of the add-on.
1014
* The utility adds the following metadata required for the index-times tests in the new conf file:

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ pytest-splunk-addon documentation
1919
index_time_tests
2020
sample_generator
2121
generate_conf
22-
release_history
2322
api_reference/api_reference
2423
troubleshoot
2524

docs/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Features
2323
Release notes
2424
-------------
2525

26-
Find details about all the releases here: :ref:`Release History Page<release_history>`
26+
Find details about all the releases `here <https://github.com/splunk/pytest-splunk-addon/releases>`_.
2727

2828
Installation
2929
------------

docs/release_history.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/sample_generator.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Data Generator
22
===============
33

4-
To ingest samples into Splunk, plugin takes `pytest-splunk-addon-data.conf` or `eventgen.conf` as input.
4+
To ingest samples into Splunk, plugin takes `pytest-splunk-addon-data.conf` as input.
55
The sample generation & ingestion takes place before executing the testcases.
66
For index-time test cases, there are multiple metadata required about the sample file for which `pytest-splunk-addon-data.conf` must be created and provided to the pytest command.
77

0 commit comments

Comments
 (0)