Skip to content

Commit

Permalink
feat: remove splunk-appinspect dependency (#499)
Browse files Browse the repository at this point in the history
BREAKING CHANGE: eventgen.conf is not supported anymore, please migrate to pytest-splunk-addon-data.conf

* feat: remove splunk-appinspect dependency (#464)
* 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 pagei
* ci: upload coverage to codecov
* chore: remove all eventgen signs
  • Loading branch information
Artem Rys committed Mar 8, 2022
1 parent 76d5ac9 commit aeac92a
Show file tree
Hide file tree
Showing 49 changed files with 1,174 additions and 3,018 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,15 @@ jobs:
test-splunk-matrix:
name: Test Matrix
needs:
- pre-commit
- compliance-dependencies
- compliance-copyrights
- test-splunk-external
- test-splunk-doc
- test-splunk-unit
- review_secrets
- review-dog-misspell
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -213,25 +222,20 @@ jobs:
curl -sSL https://install.python-poetry.org | python3 -
poetry install
poetry run coverage run --source=./pytest_splunk_addon/standard_lib -m pytest -v tests/unit
poetry run coverage html
- name: Archive test coverage results
uses: actions/upload-artifact@v2
poetry run coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
name: code-coverage-report-unit-tests
path: htmlcov

token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true
publish:
name: publish
needs:
- pre-commit
- compliance-dependencies
- compliance-copyrights
- test-splunk-external
- test-splunk-doc
- test-splunk-matrix
- test-splunk-unit
- review_secrets
- review-dog-misspell
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ repos:
rev: v4.1.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/psf/black
rev: 21.12b0
hooks:
Expand Down
6 changes: 1 addition & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@ Developing

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

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

.. code:: bash
$ git clone --recurse-submodules -j8 git@github.com:splunk/pytest-splunk-addon.git
$ #setup python venv must be 3.7
$ #setup python venv must be 3.7
$ /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 -m venv .venv
$ source .venv/bin/activate
Expand All @@ -57,8 +55,6 @@ Note2: Appinspect requires libmagic verify this has been installed correctly eac
$ pip3 install -r requirements.txt
$ pip3 install https://download.splunk.com/misc/appinspect/splunk-appinspect-latest.tar.gz
$ python setup.py develop
Expand Down
6 changes: 3 additions & 3 deletions docs/api_reference/sample_generation.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
DataGenerator
------------------

EventgenParser
~~~~~~~~~~~~~~~~~~
.. automodule:: standard_lib.sample_generation.eventgen_parser
PytestSplunkAddonDataParser
~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: standard_lib.sample_generation.pytest_splunk_addon_data_parser
:members:
:show-inheritance:

Expand Down
6 changes: 5 additions & 1 deletion docs/generate_conf.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ Generate Conf Utility
.. _generate_conf:

Overview
""""""""""
""""""""

.. note::

This is deprecated since `pytest-splunk-addon` v1.12.0 and latest available version is v1.11.4.

* The utility helps in creating the `pytest-splunk-addon-data.conf` from the existing `eventgen.conf` of the add-on.
* The utility adds the following metadata required for the index-times tests in the new conf file:
Expand Down
1 change: 0 additions & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ pytest-splunk-addon documentation
index_time_tests
sample_generator
generate_conf
release_history
api_reference/api_reference
troubleshoot

Expand Down
2 changes: 1 addition & 1 deletion docs/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Features
Release notes
-------------

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

Installation
------------
Expand Down
7 changes: 0 additions & 7 deletions docs/release_history.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/sample_generator.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Data Generator
===============

To ingest samples into Splunk, plugin takes `pytest-splunk-addon-data.conf` or `eventgen.conf` as input.
To ingest samples into Splunk, plugin takes `pytest-splunk-addon-data.conf` as input.
The sample generation & ingestion takes place before executing the testcases.
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.

Expand Down

0 comments on commit aeac92a

Please sign in to comment.