cos/tools: Fix http client credentials check for changelog

JSON file in google.Credentials maybe empty if authentication is provided by the environment instead of a credential file. This is the case in GCP environments. Remove empty length check to proceed even if JSON is empty.
Also, fix typos and resolve errors in unit tests.

BUG=b/297072390
RELEASE_NOTE=None

Change-Id: I630a8d74693298579da6662a0d1ce12d13abea70
Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/56347
Reviewed-by: Robert Kolchmeyer <rkolchmeyer@google.com>
Cloud-Build: GCB Service account <228075978874@cloudbuild.gserviceaccount.com>
Tested-by: Nandhini Rengaraj <nrengaraj@google.com>
8 files changed
tree: ef194b1df618790d228667f5b49b1dc6cf9bc2ee
  1. coverage/
  2. release/
  3. src/
  4. testing/
  5. .gitignore
  6. BUILD.bazel
  7. cloudbuild.yaml
  8. CONTRIBUTING.md
  9. deps.bzl
  10. go.mod
  11. go.sum
  12. LICENSE
  13. README.md
  14. run_tests.sh
  15. WORKSPACE
README.md

Tools for Container-Optimized OS

This is a repository of various tools developed for Container-Optimized OS. Examples include cos-gpu-installer, cos-toolbox, etc.

See CONTRIBUTING.md for how to contribute.