[client] Fix regression in named cache symlink handling

- Fix invalid variable in failure path.
- Add unit tests for the failure paths in install() and uninstall().
- Stop allocating before ensuring the directory is not empty.
- Make named cache symlinks relative instead of absolute.
- Update cleanup() expectation.
- Migrate all calls to use fs, which handles long paths on Windows.
- Make install() and uninstall() return the cache size, to improve the
  test expectations.
- Fix a typo left in bd2a81bbd3a1c96392edce9f.

Change-Id: I04a5e561548a9412909a5cf82f00c62ae93e22a7
Reviewed-on: https://chromium-review.googlesource.com/c/1436119
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Cr-Mirrored-From: https://chromium.googlesource.com/infra/luci/luci-py
Cr-Mirrored-Commit: 5807903d5d0a93786bd0c6c6d04c0c84cec683aa
2 files changed
tree: f045e578022fe9f6f9d6868b7c6283c781d68448
  1. example/
  2. libs/
  3. proto/
  4. tests/
  5. third_party/
  6. tools/
  7. utils/
  8. .gitignore
  9. auth.py
  10. cipd.py
  11. isolate.py
  12. isolate_format.py
  13. isolate_storage.py
  14. isolated_format.py
  15. isolateserver.py
  16. LICENSE
  17. local_caching.py
  18. LUCI_CONTEXT.md
  19. OWNERS
  20. PRESUBMIT.py
  21. README.md
  22. README.py
  23. run_isolated.py
  24. swarming.py
  25. trace_inputs.py
  26. WATCHLISTS
README.md

LUCI Python Client

This is the Python Client code for LUCI. It's part of the main python repo, and is also mirrored into a standalone client-py repo.

To contribute changes you need to clone the main python repo and then use git cl upload. The client-py repo mirror (which appears in Chromium's third_party directory) cannot be contributed to directly.

License

This project is licensed under Apache v2.0 license. See LICENSE for details.