Skip to content

Commit

Permalink
test: add appinspect check for expected add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
artemrys authored and Artem Rys committed Aug 18, 2021
1 parent 6535a15 commit 68aa84b
Show file tree
Hide file tree
Showing 18 changed files with 46 additions and 1 deletion.
29 changes: 28 additions & 1 deletion .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,34 @@ jobs:
with:
name: test-results-unit-python_${{ matrix.python-version }}
path: test-results/*

appinspect-for-expected-outputs:
name: Appinspect ${{ matrix.tags }} tests/expected_output_global_config_inputs_configuration_alerts/Splunk_TA_UCCExample
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
tags:
- "cloud"
- "appapproval"
- "deprecated_feature"
- "developer_guidance"
- "future"
- "self-service"
- "splunk_appinspect"
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install slim
run: pip install splunk-packaging-toolkit
- name: Slim tests/expected_output_global_config_inputs_configuration_alerts/Splunk_TA_UCCExample
run: mkdir tests/slimmed; slim package tests/expected_output_global_config_inputs_configuration_alerts/Splunk_TA_UCCExample -o tests/slimmed
- uses: splunk/appinspect-cli-action@main
with:
app_path: tests/slimmed
included_tags: ${{ matrix.tags }}
lint:
runs-on: ubuntu-latest
name: Lint Code Base
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions tests/data/test_ucc_generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def test_ucc_generate_with_inputs_configuration_alerts(self):
),
msg=f"Expected file {expected_file_path} is different from {actual_file_path}",
)
files_to_exist = [
("static", "appIcon.png"),
("static", "appIcon_2x.png"),
("static", "appIconAlt.png"),
("static", "appIconAlt_2x.png"),
]
for f in files_to_exist:
expected_file_path = path.join(expected_folder, *f)
self.assertTrue(path.exists(expected_file_path))

def test_ucc_generate_with_configuration(self):
with tempfile.TemporaryDirectory() as temp_dir:
Expand Down Expand Up @@ -124,6 +133,15 @@ def test_ucc_generate_with_configuration(self):
),
msg=f"Expected file {expected_file_path} is different from {actual_file_path}",
)
files_to_exist = [
("static", "appIcon.png"),
("static", "appIcon_2x.png"),
("static", "appIconAlt.png"),
("static", "appIconAlt_2x.png"),
]
for f in files_to_exist:
expected_file_path = path.join(expected_folder, *f)
self.assertTrue(path.exists(expected_file_path))

def test_ucc_generate_with_configuration_files_only(self):
with tempfile.TemporaryDirectory() as temp_dir:
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 68aa84b

Please sign in to comment.