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

testcases: simplify test structure #34

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

Shwetha-Acharya
Copy link
Collaborator

pytest by default runs the functions preceeded with test keyword. As a result, all the required test functions will be executed. Hence, this PR simplifies the code by removing the unnecessary main block.

Copy link
Collaborator

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

Looks OK to me.

Copy link
Collaborator

@anoopcs9 anoopcs9 left a comment

Choose a reason for hiding this comment

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

lgtm.

I think we have a conflict pending to be resolved.

pytest by default runs the functions preceeded with test keyword.
As a result, all the required test functions will be executed.
Hence, this PR simplifies the code by removing the unnecessary main block.

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
@Shwetha-Acharya
Copy link
Collaborator Author

I just rebased the change after resolving the conflict @anoopcs9

We were obtaining test_info in two ways:
1. as a parameter from main
2. as a env variable

Now that the main block is removed as redundance, this change eliminates
the test_info occurrances initiated from main block and replaces it with the
environment variable

Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Shwetha-Acharya added a commit to Shwetha-Acharya/sit-test-cases that referenced this pull request Oct 16, 2023
With this change, multiple test modules triggered from testcases/mount
can be run as individual tests complying to pytest standards.
Also any number of new tests can be added efficiently on the mount.

Fixes: samba-in-kubernetes#30
depends on samba-in-kubernetes#34
Signed-off-by: Shwetha K Acharya <Shwetha.K.Acharya@ibm.com>
Copy link
Collaborator

@spuiuk spuiuk left a comment

Choose a reason for hiding this comment

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

ACK

@spuiuk spuiuk merged commit 67419de into samba-in-kubernetes:main Oct 16, 2023
5 of 7 checks passed
@Shwetha-Acharya Shwetha-Acharya deleted the simplify-code branch October 16, 2023 08:47
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