-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from VatsalJagani/test-cases
Test cases
- Loading branch information
Showing
32 changed files
with
534 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# This is a basic workflow to run automated test-cases on GitHub App Action | ||
name: Running Python Unit Tests for Splunk-App-Action | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
on: | ||
push: | ||
branches: | ||
- 'develop' | ||
|
||
pull_request: | ||
branches: | ||
- '*' | ||
- '*/*' | ||
- '**' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
python-unit-tests: | ||
name: "Running Python Unit Test Cases" | ||
runs-on: "ubuntu-latest" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
|
||
- name: Display Python version | ||
run: python -c "import sys; print(sys.version)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r tests/requirements.txt | ||
- name: Run Python Unit Tests | ||
run: pytest tests --junitxml=junit/test-results.xml --cov=src --cov-config=tests/.coveragerc --cov-report=xml | ||
|
||
- name: Linting with Ruff | ||
run: ruff --output-format=github . | ||
continue-on-error: true # need to remove this later on to catch the errors anf fail the workflow on linting errors | ||
|
||
- name: Adding GitHub action step summary | ||
uses: VatsalJagani/[email protected] | ||
with: | ||
pytest_results_file: "junit/test-results.xml" | ||
pytest_cov_file: "coverage.xml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[run] | ||
omit = | ||
# omit extra utilities files | ||
utilities/common_splunk_js_utilities/splunk_common_js_v_utilities.js | ||
utilities/logger/logger_manager.py | ||
utilities/ucc_additional_packaging/additional_packaging.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
pytest | ||
pytest-cov | ||
ruff |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# just a comment in the file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
# global comment-1 | ||
|
||
GLOBAL_OPTION1 = GLOBAL_VALUE1 | ||
GLOBAL_OPTION2 = GLOBAL_VALUE2 | ||
|
||
# global comment-2 | ||
|
||
[STANZA1] | ||
# comment in stanza1 | ||
OPTION1 = VALUE1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Hello | ||
MY VALUE | ||
|
||
[STANZA] | ||
OPTION = VALUE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
[STANZA1] | ||
# This is my Stanza1 | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
[STANZA1] | ||
# This is my Stanza1 - Comment Changed | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# hello just comment from file-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# hello just comment from file-2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 | ||
OPTION2_1 = VALUE2_1 | ||
|
||
[STANZA3] | ||
OPTION3 = VALUE3 | ||
OPTION_3_1 = VALUE_3_1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 | ||
|
||
[STANZA3] | ||
OPTION3 = VALUE3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
[STANZA1] | ||
# This is my Stanza1 info | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 | ||
|
||
[STANZA2] | ||
OPTION2 = VALUE2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = VALUE1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
|
||
[STANZA1] | ||
OPTION1 = NEW_VALUE1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[STANZA1] | ||
OPTION1 = VALUE1 | ||
OPTION2 = VALUE2 | ||
|
||
[STANZA2] | ||
# comment in stanza2 | ||
OPTION3 = VALUE3 | ||
|
||
# Comment after stanza | ||
# This is a comment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[STANZA1] | ||
OPTION1 = VALUE1\ | ||
VALUE2\ | ||
WITH\ | ||
NEWLINES | ||
# above option1 is multi-valued | ||
OPTION2 = VALUE2 | ||
|
||
[STANZA2] | ||
OPTION3 = VALUE3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[abc] | ||
xyz = pqrst1 |
Oops, something went wrong.