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

feat(test): Adding betelgeuse docstrings to test_client.py #270

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

zpetrace
Copy link
Contributor

@zpetrace zpetrace commented Aug 1, 2024

Adding betelgeuse docstrings to test_client.py

Copy link
Member

@Lorquas Lorquas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. How are you generating the test cases and/or adding them to the junit.xml with betelgeuse? I would like to test this out directly...

@ptoscano
Copy link
Contributor

ptoscano commented Aug 6, 2024

I would like to test this out directly...

Indeed -- this definitely needs to be tested with a github workflow/job, to verify that the format of these various comments, otherwise IMHO it's too easy to screw them up accidentally.

@Lorquas
Copy link
Member

Lorquas commented Aug 6, 2024

Other note, don't we need an :id: <uuid> field?

@Lorquas
Copy link
Member

Lorquas commented Aug 7, 2024

Update from slack convo:

  • We're going to co-opt this PR and add a README for the various manual betelgeuse invocations
  • This PR will be blocked by CCT-675 where we will attempt to add .github/workflow and other automations (using this branch as a starting point)

@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch from 6531c62 to 614cfa1 Compare August 7, 2024 15:45
@Lorquas Lorquas self-requested a review August 8, 2024 18:28
@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch from 614cfa1 to c5a81ab Compare August 9, 2024 12:42
@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch 2 times, most recently from fc48d2c to 1d9779c Compare August 28, 2024 14:41
@zpetrace zpetrace marked this pull request as draft August 28, 2024 14:43
@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch from 1d9779c to 8fed77d Compare August 30, 2024 10:54
@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch 2 times, most recently from b23ddcf to 2ec351b Compare September 2, 2024 11:22
@zpetrace zpetrace marked this pull request as ready for review September 2, 2024 11:23
@zpetrace zpetrace requested review from ptoscano and removed request for Archana-PandeyM September 2, 2024 11:23
Copy link
Contributor

@ptoscano ptoscano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a bit of inconsistency in the various steps & results that talk about registering with insights-client:

Steps:

    2. Register insights-client
    1. Register the insights-client to generate log files
    2. Register insights-client and perform pazload operations
    1. Register the insights-client

Results:

    2. The insights-client registers successfully
    1. Insights-client is registered and log files are generated
    2. The insights-client registers successfully and logs are populated
    1. Insights-client is registrated
    1. Insights-client is registered

Ignoring the typos and the numbers, what I personally suggest is:

  • keep the step & result to only mention the registration & its successfull result
  • move other bits to own steps & results
  • use a single wording, for example:
    • [step] Register insights-client
    • [result] Insights-client is registered successfully

This approach applies also to the testimony docstrings added in other PRs.


I see testimony validation failures for all the tests like the following:

test_client_files_permission:19
-------------------------------

* Tokens with invalid values:
  Tier: Tier 0
      type: choice
      case sensitive: False
      choices: ['tier 1', 'tier 2', 'tier 3']

I'm using the testimony.yml as currently available in #282, which has:

Tier:
  casesensitive: false
  required: true
  type: choice
  choices:
    - Tier 1
    - Tier 2
    - Tier 3

Hm, I wonder whether this seems like a bug in testimony...

integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Show resolved Hide resolved
integration-tests/test_client.py Show resolved Hide resolved
integration-tests/test_client.py Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch 2 times, most recently from 615a450 to 1bce9b5 Compare September 2, 2024 13:21
@zpetrace
Copy link
Contributor Author

zpetrace commented Sep 2, 2024

I tried to get rid of the inconsistencies in wordings and also correct the typos etc. However I am not sure I understood

move other bits to own steps & results

However I am not sure I understood this part. If you can explain some more, please.

@zpetrace
Copy link
Contributor Author

zpetrace commented Sep 3, 2024

Hi @ptoscano, I have corrected the issues with the failing testimony. You can now use the current version of testimony after my last commit on #282. It now should look like this:

Total number of tests: 7
Total number of invalid docstrings: 0 (00.00%)
Test cases with no docstrings: 0 (0.00%)
Test cases missing minimal docstrings: 0 (0.00%)
Test cases with unexpected tags: 0 (0.00%)
Test cases with unexpected token values in docstrings: 0 (0.00%)
Test cases with unparseable docstrings: 0 (0.00%)

@zpetrace
Copy link
Contributor Author

zpetrace commented Sep 3, 2024

/packit retest-failed

integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
integration-tests/test_client.py Outdated Show resolved Hide resolved
@zpetrace zpetrace force-pushed the zpetrace/betelgeuse_test_client branch from 9ec8cdd to 2834144 Compare September 18, 2024 10:24
@zpetrace
Copy link
Contributor Author

I have changed the capitalization to the same format for every test as it was confusing. Hope that's better:)

@ptoscano ptoscano merged commit 160cdce into master Sep 18, 2024
19 of 20 checks passed
@ptoscano ptoscano deleted the zpetrace/betelgeuse_test_client branch September 18, 2024 12:26
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