mirror of
https://github.com/rclone/rclone.git
synced 2026-09-12 22:24:25 -04:00
The test asks InstallUpdate to install the latest beta into an unwritable file and expects an error. When the binary under test reports exactly the latest beta version (as make quicktest does right after a beta is published from the same commit), InstallUpdate correctly decides there is nothing to do and returns nil, and the test then dereferences the nil error and panics. Pin fs.Version to a fixed old value for the duration of the test so an update is always attempted, and use require.Error so a missing error fails the test instead of crashing it.