-
Notifications
You must be signed in to change notification settings - Fork 292
CP-49928/static-vdis
: Add tests (1/3 of: prepare move to python3/
)
#5740
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
CP-49928/static-vdis
: Add tests (1/3 of: prepare move to python3/
)
#5740
Conversation
Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
1a21de9
to
d6ac6a6
Compare
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.
Details:
This PR extracts the 1st commit of #5731 for a smaller/split review and merge:
Before scripts/static-vdis
can be moved to the python3
tree, the pytype
warnings need to be fixed.
- For this, a few functions need tiny, mostly stylistic changes to satisfy type checking warnings.
But before we can do that:
- the functions need code coverage to pass the diff-coverage check in CI.
Hence, add two simple test cases to:
- cover these functions
and to - test them to ensure that they continue to work.
PS:
By already having the approvals of @psafont and @stephenchengCloud as part of #5731, this already has two approvals:
- One by @psafont (1 of two needed member approvals) and one by @stephenchengCloud as a guest.
- I opened this just to make the remaining PR that fixes the type warnings much smaller.
Updates applied:
-
Added
mv
oftest_static_vdis.py
topython3/tests/
-
Applied using pytest infrastructure to simplify the test cases a lot.
-
Rebased to the latest tip of
feature/py3
with race fixes for CI and two python moves merged. -
This provides the groundwork (pre-conditions) for fixing the pytype and pyright warnings of static-vdis in CP-49928/
static-vdis
: Fix pyright (3/3 of: prepare move topython3/
) #5731:- After this is done, the next CP-49928/
static-vdis
: Fix pyright (3/3 of: prepare move topython3/
) #5731 can be reviewed, or its 2nd commit can be split from it- After this is done, the
mv
ofstatic-vdis
topython3/
should be possible to do.
- After this is done, the
- After this is done, the next CP-49928/
list_vdis()
and fresh_name()
of static-vdis
.static-vdis
: Add tests (1/3 of: prepare move to python3/
)
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.
Giving approval to unblock these merges. There are already 2 ticks from people more qualified to review this than me, it'd be good to get some movement.
Warning fix (for pyright) in scripts/static-vdis: - fresh_name is covered by github.com/xapi-project/pull/5740 Details: Always return a value in fresh_name(): - Was already so, but pyright doesn't "understand" this. - Fix the warning by de-indenting `return 0` of fresh_name() Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
Summary:
list_vdis()
andfresh_name()
ofstatic-vdis
Adding just for information: @ashwin9390, @stephenchengCloud