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

unittests: Fixes unit tests for Windows (part 2) #110399

Merged
merged 1 commit into from Aug 1, 2022

Commits on Aug 1, 2022

  1. unittests: Fixes unit tests for Windows (part 2)

    Currently, there are some unit tests that are failing on Windows due to
    various reasons:
    
    - volume mounting is a bit different on Windows: Mount will create the
      parent dirs and mklink at the volume path later (otherwise mklink will
      raise an error).
    - os.Chmod is not working as intended on Windows.
    - path.Dir() will always return "." on Windows, and filepath.Dir()
      should be used instead (which works correctly).
    - on Windows, you can't typically run binaries without extensions. If
      the file C:\\foo.bat exists, we can still run C:\\foo because Windows
      will append one of the supported file extensions ($env:PATHEXT) to it
      and run it.
    - Windows file permissions do not work the same way as the Linux ones.
    - /tmp directory being used, which might not exist on Windows. Instead,
      the OS-specific Temp directory should be used.
    
    Fixes a few other issues:
    
    - rbd.go: Return error in a case in which an error is encountered. This
      will prevent "rbd: failed to setup" and "rbd: successfully setup" log
      messages to be logged at the same time.
    claudiubelu committed Aug 1, 2022
    Configuration menu
    Copy the full SHA
    38092cb View commit details
    Browse the repository at this point in the history