-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue:3897880:PDR:Exclusion list tests #214
Closed
Closed
Changes from 17 commits
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
babe045
3897880:PDR black list tests (initial steps)
vg12345 5dee646
Pylint test
vg12345 c6aa08a
Fix for requirements file location
vg12345 ee3564a
Added missing empty file
vg12345 9451c9b
First simple pytest test
vg12345 1d7629f
Test file path fix
vg12345 389a353
Minor fix
vg12345 5bf6458
Minor fix
vg12345 0b34f10
Import paths
vg12345 d57b663
Fix
vg12345 f3d08b2
Fix
vg12345 056af80
Fix 3
vg12345 b874461
Fix 4
vg12345 3193651
Fix 5
vg12345 e9a4617
Fix 6
vg12345 7199f4b
Fix 7
vg12345 2b8d6f0
Fix 8
vg12345 8e2edc3
issue: 3899827: Updating TFS documentations for 1.0.0-14 (#213)
ananalaghbar b2b889c
issue: 3799995: Integrate PEP8/ pylint into TFS CI process (#210)
ananalaghbar fc2fca1
Test ExcludeList class methods directly
vg12345 26070aa
Initial REST API test and generated requirements file
vg12345 4d94359
Rollback for requirements file
vg12345 2702989
Disable REST API test
vg12345 2110e43
Experimental
vg12345 aad96f7
Rollback experimental
vg12345 e15b99b
Experiment with standalone plugin
vg12345 f405f1d
Experiment with standalone plugin
vg12345 e6cd666
Experiment with standalone plugin
vg12345 7aee83f
Experiment with standalone plugin
vg12345 6ed1bcc
Experiment with standalone plugin
vg12345 8d9ce72
Experiment with standalone plugin
vg12345 031da81
Temp: full simulation
vg12345 c0faf9e
Temp: full simulation
vg12345 7ffef77
Temp: full simulation
vg12345 ead0b08
Temp: full simulation
vg12345 995d0d2
Temp: full simulation
vg12345 0bb2374
Temp: full simulation
vg12345 8e5920a
Temp: full simulation
vg12345 bc9d5d4
Temp: full simulation
vg12345 547d87c
Temp: full simulation
vg12345 5854493
Temp: full simulation
vg12345 cfa8bb8
Temp: full simulation
vg12345 9ecf0aa
Temp: full simulation
vg12345 ff1829a
Temp: full simulation
vg12345 2904204
3893890:Issue:Exclusion list CI testing for PDR plugin (#211)
vg12345 977301d
3897880:PDR black list tests (initial steps)
vg12345 ac2a654
Pylint test
vg12345 8f7b52d
Fix for requirements file location
vg12345 5c24cf2
Added missing empty file
vg12345 6c61686
First simple pytest test
vg12345 4d2571c
Test file path fix
vg12345 ca4c2c6
Minor fix
vg12345 6a18ae2
Minor fix
vg12345 a8fec04
Import paths
vg12345 b43e1fa
Fix
vg12345 12611bb
Fix
vg12345 e8fd436
Fix 3
vg12345 50b0d20
Fix 4
vg12345 0cb179e
Fix 5
vg12345 c5f7757
Fix 6
vg12345 f0ab602
Fix 7
vg12345 bb86113
Fix 8
vg12345 19aba8f
Test ExcludeList class methods directly
vg12345 d76d764
Initial REST API test and generated requirements file
vg12345 a133545
Rollback for requirements file
vg12345 76b47a1
Disable REST API test
vg12345 ce6fd82
Experimental
vg12345 de2692a
Rollback experimental
vg12345 2bcb80c
Experiment with standalone plugin
vg12345 1de470d
Experiment with standalone plugin
vg12345 f2fb103
Experiment with standalone plugin
vg12345 1713076
Experiment with standalone plugin
vg12345 0e888c6
Experiment with standalone plugin
vg12345 01da588
Experiment with standalone plugin
vg12345 691e627
Temp: full simulation
vg12345 d370b69
Temp: full simulation
vg12345 a051d08
Temp: full simulation
vg12345 b9696c4
Temp: full simulation
vg12345 16a958a
Temp: full simulation
vg12345 2518e3e
Temp: full simulation
vg12345 d8fa0b6
Temp: full simulation
vg12345 701ab9c
Temp: full simulation
vg12345 c45c37b
Temp: full simulation
vg12345 feb7c39
Temp: full simulation
vg12345 a2907c5
Temp: full simulation
vg12345 9466b18
Temp: full simulation
vg12345 cc8ed4e
Temp: full simulation
vg12345 98cd1b4
Temp: full simulation
vg12345 b0d6f54
Temp: full simulation
vg12345 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,33 @@ | ||
name: PDR Plugin CI Workflow | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'plugins/pdr_deterministic_plugin/**' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PYTHONPATH: '.:plugins/pdr_deterministic_plugin/ufm_sim_web_service' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@main | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@main | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip install -r plugins/pdr_deterministic_plugin/requirements.txt | ||
pip install pylint | ||
pip install pytest pytest-cov | ||
|
||
- name: Run PyLint | ||
run: pylint --rcfile=plugins/pdr_deterministic_plugin/.pylintrc plugins/pdr_deterministic_plugin | ||
|
||
- name: Test exclude list with pytest | ||
run: pytest plugins/pdr_deterministic_plugin/tests/exclude_list_tests.py --doctest-modules --junitxml=junit/exclude_list_tests_results.xml --cov=com --cov-report=xml --cov-report=html |
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,17 @@ | ||
[MASTER] | ||
init-hook="import os, sys; sys.path.append(os.path.join(os.getcwd(), 'plugins', 'pdr_deterministic_plugin', 'src')); sys.path.append(os.path.join(os.getcwd(), 'utils'))" | ||
|
||
[MAIN] | ||
max-public-methods=100 | ||
|
||
[DESIGN] | ||
max-attributes=10 | ||
|
||
[MESSAGES CONTROL] | ||
disable=missing-module-docstring,missing-function-docstring,fixme | ||
|
||
[FORMAT] | ||
max-line-length=140 | ||
|
||
[BASIC] | ||
min-public-methods=0 |
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 @@ | ||
# | ||
# Copyright © 2013-2024 NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. | ||
# | ||
# This software product is a proprietary product of Nvidia Corporation and its affiliates | ||
# (the "Company") and all right, title, and interest in and to the software | ||
# product, including all associated intellectual property rights, are and | ||
# shall remain exclusively with the Company. | ||
# | ||
# This software product is governed by the End User License Agreement | ||
# provided with the software product. | ||
# |
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 @@ | ||
requests | ||
configparser | ||
flask | ||
flask_restful | ||
twisted | ||
tzlocal<3.0 | ||
jsonschema | ||
pandas | ||
numpy | ||
prometheus_client | ||
msgpack |
36 changes: 36 additions & 0 deletions
36
plugins/pdr_deterministic_plugin/tests/exclude_list_tests.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,36 @@ | ||
# | ||
# Copyright © 2013-2024 NVIDIA CORPORATION & AFFILIATES. ALL RIGHTS RESERVED. | ||
# | ||
# This software product is a proprietary product of Nvidia Corporation and its affiliates | ||
# (the "Company") and all right, title, and interest in and to the software | ||
# product, including all associated intellectual property rights, are and | ||
# shall remain exclusively with the Company. | ||
# | ||
# This software product is governed by the End User License Agreement | ||
# provided with the software product. | ||
# | ||
|
||
import os | ||
import tempfile | ||
|
||
#import pytest | ||
from constants import PDRConstants as Constants | ||
from exclude_list import ExcludeList | ||
from isolation_algo import create_logger | ||
|
||
def test_get_from_empty_exclude_list(): | ||
""" | ||
Create exclude list and ensure its empty via its method | ||
""" | ||
print("Test 5") | ||
|
||
log_name = os.path.basename(Constants.LOG_FILE) | ||
log_path = os.path.join(tempfile.gettempdir(), log_name) | ||
|
||
logger = create_logger(log_path) | ||
exclude_list = ExcludeList(logger) | ||
items = exclude_list.items() | ||
assert not items | ||
|
||
if __name__ == '__main__': | ||
test_get_from_empty_exclude_list() |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you create this file manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I just looked for dependencies and added them, so the test will finish with successs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will generate it automatically