Files
gpu-rent/tests/test_clone_ext_update.py
Leonid Pershin a9cf2e0f90 Add support for gpu-rent.vars and enhance git update functionality
- Updated .gitignore to include gpu-rent.vars.
- Modified env.example to introduce the UPDATE_GIT variable for controlling git updates during execution.
- Implemented Import-GpuRentVars function in gpu-rent.ps1 to load environment variables from gpu-rent.vars.
- Enhanced gpu-rent.sh to support loading variables from gpu-rent.vars and added logic for handling default and extra arguments.
- Updated CLI documentation to reflect the new gpu-rent.vars file and its usage in configuration.
- Improved bootstrap and provisioning logic to conditionally perform git updates based on the new configuration.
2026-08-21 05:01:53 +03:00

16 lines
474 B
Python

from gpu_rent.remote.clone_ext import do_update, is_sha
def test_is_sha():
assert is_sha("a" * 40)
assert not is_sha("main")
def test_do_update_reads_flag(tmp_path, monkeypatch):
flag = tmp_path / "gpu-rent-update-git"
monkeypatch.setattr("gpu_rent.remote.clone_ext.UPDATE_PATH", flag)
flag.write_text("0\n", encoding="utf-8")
assert do_update() is False
flag.write_text("1\n", encoding="utf-8")
assert do_update() is True