Skip to content

Commit

Permalink
Adding a Github workflow fo testimony validation
Browse files Browse the repository at this point in the history
  • Loading branch information
zpetrace committed Jan 6, 2025
1 parent df98f19 commit eeb159c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 15 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/testimony.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Testimony Validation

on:
pull_request:
paths:
- "integration-tests/**"

jobs:
testimony:
name: testimony validate
runs-on: ubuntu-latest
container:
image: fedora:latest

steps:
- name: Setup for Testimony
run: |
dnf --setopt install_weak_deps=False install -y \
python3-pip
python3 -m pip install testimony
- uses: actions/checkout@v4

- name: Run Testimony
run: |
testimony validate --config \
integration-tests/testimony.yml integration-tests/test*
4 changes: 2 additions & 2 deletions integration-tests/test_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_status_registered(external_candlepin, insights_client):
2. Wait time completes without issues
3. If 'legacy_upload' is True, output contains "Insights API confirms
registration." If 'legacy_upload' is False, output is "This host
is registered.\n"
is registered."
"""
insights_client.register()
assert conftest.loop_until(lambda: insights_client.is_registered)
Expand Down Expand Up @@ -63,7 +63,7 @@ def test_status_unregistered(external_candlepin, insights_client):
2. If 'legacy_upload' is True return code is 1 and output contains
"Insights API says this machine is NOT registered."
If 'legacy_upload' is False return code is 0 and output contains
"This host is unregistered.\n"
"This host is unregistered."
"""
# running unregistration to ensure system is unregistered
with contextlib.suppress(Exception):
Expand Down
22 changes: 9 additions & 13 deletions integration-tests/test_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,19 @@ def test_tags(insights_client, external_inventory, test_config):
:description:
Test how the tags generated, and check the tags on inventory
:reference:
:tier: Tier 1
steps:
1. Register insights-client, and check satellite related
tags on the inventory if the test env is satellte.
:tags: Tier 1
:steps:
1. Register insights-client, and check satellite related tags
on the inventory if the test env is satellte.
2. Run insights-client with the --group
3. Add a new tag in tags.yaml, and run insights-client,
then check the inventory
then check the inventory
:expectedresults:
1. system is registered to insights, and there will be
satellite related tags supported by branch_info with
satellite env.
1. System is registered to insights, and there will be
satellite related tags supported by branch_info with
satellite env.
2. tags.yaml will be created with group option, and new tag
generated by tags.yaml
generated by tags.yaml
3. The new tag shows on inventory by modifying tags.yaml
"""
# Remove the tags.yaml if it exists
Expand Down
49 changes: 49 additions & 0 deletions integration-tests/testimony.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
Id:
casesensitive: false
required: true
type: string
Reference:
casesensitive: false
required: false
type: string
CaseComponent:
casesensitive: false
required: true
type: string
Requirement:
casesensitive: false
required: true
type: choice
choices:
- RHSS-291297
SubSystemTeam:
casesensitive: false
required: true
type: choice
choices:
- sst_csi_client_tools
CaseAutomation:
casesensitive: false
required: true
type: string
Upstream:
casesensitive: false
type: string
Title:
casesensitive: false
type: string
Description:
casesensitive: false
required: true
type: string
Tags:
casesensitive: true
required: true
type: choice
choices:
- Tier 1
- Tier 2
- Tier 3
Steps: {}
ExpectedResults: {}

0 comments on commit eeb159c

Please sign in to comment.