Fix an issue that causes create symlink failed when installing java on unix-like platforms.
This commit is contained in:
1 parent
8bde4ef753
commit
1754b01230
15 files changed
+600
-77
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import logging
|
||||
import sys
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
|
||||
from core_lib.common.exception import JavaRuntimeException
|
||||
from core_lib.runtime.mojang import download_java_runtimes, get_support_runtime_manifest
|
||||
|
||||
|
||||
def test_mac_os_runtime_install(tmp_path):
|
||||
destination = tmp_path / "java-runtime-epsilon"
|
||||
logger = logging.getLogger("Launcher.CoreLib")
|
||||
logger.setLevel(logging.DEBUG)
|
||||
print("Installing runtime...")
|
||||
|
||||
component = "java-runtime-epsilon"
|
||||
|
||||
download_java_runtimes(
|
||||
component,
|
||||
destination
|
||||
)
|
||||
|
||||
executable_name = "java"
|
||||
candidates = sorted(destination.rglob(executable_name))
|
||||
|
||||
print(f"{candidates=}")
|
||||
|
||||
assert any(path.is_file() for path in candidates), (
|
||||
f"Installed runtime has no {executable_name}: {destination}"
|
||||
)
|
||||
Reference in new issue
Block a user