-
Notifications
You must be signed in to change notification settings - Fork 113
Issue 6963 - Add missing __init__.py files under webui on 1.4.3 #6964
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
base: 389-ds-base-1.4.3
Are you sure you want to change the base?
Conversation
Description: Regression test collection is failing at the collection phase due to missing __init__.py files under dirsrvtests/tests/suites/webui. This causes the collection of monitoring_test.py to fail. Resolves: 389ds#6963
Reviewer's GuideEnable proper pytest collection for WebUI tests by adding package initializers under the File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey there - I've reviewed your changes - here's some feedback:
- Use subprocess.check_output and packaging.version.parse for version queries and comparisons instead of os.popen and raw string comparisons.
- Simplify the timeout loop in check_frame_assignment to use an elapsed-time check (e.g. while elapsed < timeout) rather than comparing floats to avoid potential infinite loops.
- The setup_page fixture doesn’t return any object—make sure it returns the necessary context (e.g. the page or topology) for tests to consume.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Use subprocess.check_output and packaging.version.parse for version queries and comparisons instead of os.popen and raw string comparisons.
- Simplify the timeout loop in check_frame_assignment to use an elapsed-time check (e.g. while elapsed < timeout) rather than comparing floats to avoid potential infinite loops.
- The setup_page fixture doesn’t return any object—make sure it returns the necessary context (e.g. the page or topology) for tests to consume.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
This commit allows collection of webui/monitoring to succeed, but I haven't figured out how to verify the test run yet. Need to find a way to set up a WebUI environment. |
Description: Regression test collection is failing at the collection phase due to missing init.py files under dirsrvtests/tests/suites/webui. This causes the collection of monitoring_test.py to error out and prematurely end regression test runs. Even though the tests under monitoring_test.py are usually skipped unless run from a WebUI environment, a failure to collect them will still cause the full test run to fail.
This MR pulls the init.py files from 389-ds-base-2.2 and places them under webui and webui/monitoring.
Resolves: #6963
Summary by Sourcery
Ensure pytest can discover and properly execute WebUI tests by adding package initializers and defining shared helpers and fixtures
Bug Fixes:
Enhancements: