Skip to content

Commit

Permalink
feat(test): Adding docstrings to test_common_specs.py (CCT-662)
Browse files Browse the repository at this point in the history
  • Loading branch information
zpetrace committed Sep 18, 2024
1 parent b166cbf commit 4592deb
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion integration-tests/test_common_specs.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
"""
:casecomponent: insights-client
:requirement: RHSS-291297
:subsystemteam: sst_csi_client_tools
:caseautomation: Automated
:upstream: Yes
"""

import json
import os
import pytest
Expand All @@ -6,7 +14,30 @@


def test_common_specs(insights_client, tmp_path):
"""Verify that the specified specs can be collected and parsed as expected."""
"""
:id: 9010f731-ca05-4abb-b119-de9730b055c1
:title: Test common specs
:description:
This test verifies that the specified specs can be collected,
parsed and contain valid data without errors
:reference:
:tier: Tier 1
:steps:
1. Define the list of common specs to be tested
2. Run the insights-client to collect data and save it in the
specified temporary directory
3. For each spec in the list check that it exists in the
correct location
4. Verify the spec file contains no errors
5. Verify the spec file has valid results
:expectedresults:
1. The list of specs is correctly defined
2. The client runs and the data is saved in the tmp_path directory
3. Each spec file is found in the meta_data directory and none is missing
4. Data contains no errors (data["errors"] is empty or does not exist)
5. Each spec contains valid results (data["results"] is not None) confirming
the data was successfully collected
"""
common_specs = [
"insights.specs.Specs.date.json",
"insights.specs.Specs.dmidecode.json",
Expand Down

0 comments on commit 4592deb

Please sign in to comment.