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

Make runCmd() default to text; compatible with host-installer code #107

Merged
merged 3 commits into from
Jul 3, 2023

Commits on Jun 30, 2023

  1. xcp/compat.py: open_defaults_for_utf8_text() Default to text mode

    For xcp.cmd.runCmd() to be compatible with host-installer's runCmd,
    make `mode="r"` the default for runCmd(all commands in host-installer
    return text, not binary data to the caller)
    
    Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
    bernhardkaindl committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    86180c0 View commit details
    Browse the repository at this point in the history
  2. tests/test_mountingaccessor.py: Fix tests to not mock xcp.cmd.runCmd()

    Test MountingAccessor without mocking xcp.cmd.runCmd(). Instead, mock the
    subprocess calls for mounting and umounting to verify xcp.cmd.runCmd()
    
    Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
    bernhardkaindl committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    b88317d View commit details
    Browse the repository at this point in the history
  3. xcp.cmd.py.runCmd(): Add type annotation and silence typing warnings

    Signed-off-by: Bernhard Kaindl <bernhard.kaindl@cloud.com>
    bernhardkaindl committed Jun 30, 2023
    Configuration menu
    Copy the full SHA
    4aa897c View commit details
    Browse the repository at this point in the history