Skip to content

Conversation

@ikerexxe
Copy link
Collaborator

This documentation update began with the sole purpose of documenting the Python system tests, but it has grown as I have discovered new aspects of the documentation that could be improved.

As a summary:

  • Add comprehensive documentation for the new Python system testing framework
  • Document Python coding style guidelines for system tests
  • Extend CI documentation with system test details
  • Add container troubleshooting guidance

@ikerexxe ikerexxe force-pushed the document-python-test branch from 1fbbebd to 5fd0910 Compare September 11, 2025 08:24
Copy link
Member

@hallyn hallyn left a comment

Choose a reason for hiding this comment

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

I'm ok merging as is. If you update based on my comments, that's fine too.


### General conventions

* **PEP 8 compliance**: follow [PEP 8](https://pep8.org/) style guidelines.
Copy link
Member

Choose a reason for hiding this comment

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

(Took a quick look under .github/workflows and share/ansible, and didn't see anything, but maybe I missed it)

Can we have CI enforce these?

Copy link
Collaborator Author

@ikerexxe ikerexxe Oct 27, 2025

Choose a reason for hiding this comment

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

We are already doing it since #1349 was merged 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's called python-linter and you can see it running in this PR

1. Test steps
:expectedresults:
1. Expected outcomes
:customerscenario: False
Copy link
Member

Choose a reason for hiding this comment

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

What does customerscenario mean?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This means that a customer or end user has found the issue. It is usually accompanied by a ticket in the marker (i.e. gh=1348).


**Container management:**
- **List containers**: `docker ps -a` to see all containers and their status.
- **Access container**: `docker exec -it <container-name> bash` to get shell access.
Copy link
Member

Choose a reason for hiding this comment

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

let's say that the groupdel test fails. Is there a command like --shell-on-fail that can be passed to pytest to give you a bash shell in the container after the failure, so you can look around? Or does it always leave the container running so you can launch a shell in it, in the failed state?

(Either way, that would be good info in the debug documentation here :) )

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm not aware of any command that would give you a shell after the test failed but the container is left running after all tests run, this way you can look around if anything fails.

I've updated this section to make this point clear.

Document the new Python system tests:
- Benefits
- Contribution guidance
- How to setup the testing environment
- Test configuration and execution
- Advanced testing features
- Development patterns
- Debugging information
- Troubleshooting & FAQs

Signed-off-by: Iker Pedrosa <[email protected]>
Extend the container section to document the container troubleshooting.

Signed-off-by: Iker Pedrosa <[email protected]>
Extend the system tests section.

Signed-off-by: Iker Pedrosa <[email protected]>
Document coding style for Python code used in system tests.

Signed-off-by: Iker Pedrosa <[email protected]>
@ikerexxe ikerexxe force-pushed the document-python-test branch from 5fd0910 to 80021c7 Compare October 27, 2025 14:00
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.

3 participants