Skip to content
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

Implementing logging per test case. #159

Merged
merged 2 commits into from
Jun 10, 2019

Conversation

vavuthu
Copy link
Contributor

@vavuthu vavuthu commented Jun 6, 2019

Implementing logging per test case.

  • creates the directory structure for logging
  • creates symlink for easy access to logs

Example for symlink:

[vavuthu@localhost tmp]$ ls -lrt | tail -2
drwxrwxr-x.   3 vavuthu vavuthu     60 Jun  6 15:52 logs_1559816529
lrwxrwxrwx.   1 vavuthu vavuthu     20 Jun  6 15:52 logs -> /tmp/logs_1559816529
[vavuthu@localhost tmp]$ 

Example for directory structure:
lets say tests/manage/test_manage.py conatins class TestManage having 2 test cases.
o/p:
[vavuthu@localhost tmp]$ ls logs/tests/manage/test_manage/TestManage/
test_manage_test_case1.log test_manage_test_case2.log
[vavuthu@localhost tmp]$

OVERALL logging structure:

[vavuthu@localhost tmp]$ tree logs
logs
└── tests
    ├── ecosystem
    │   ├── deployment
    │   │   └── test_ocs_basic_install
    │   │       └── TestDeployment
    │   │           └── test_deployment.log
    │   └── destroy
    │       └── test_destroy_cluster
    │           └── TestDestroy
    │               └── test_destroy_cluster.log
    ├── manage
    │   └── test_manage
    │       └── TestManage
    │           ├── test_manage_test_case1.log
    │           └── test_manage_test_case2.log
    └── test_pv_creation
        └── TestPvCreation
            └── test_pv_creation.log

13 directories, 5 files
[vavuthu@localhost tmp]$ 

@vavuthu vavuthu requested a review from a team as a code owner June 6, 2019 10:32
RazTamir
RazTamir previously approved these changes Jun 6, 2019
ocsci/pytest_customization/ocsci_logging.py Outdated Show resolved Hide resolved
ocsci/pytest_customization/ocsci_logging.py Outdated Show resolved Hide resolved
ocsci/pytest_customization/ocsci_logging.py Outdated Show resolved Hide resolved
@vasukulkarni vasukulkarni merged commit 21caf6b into red-hat-storage:master Jun 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants