You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
depot_tools/tests
Florian Mayer ae510e8f08 Do not crash for non URL (i.e. SSH) remotes.
Without this change, having an SSH remote configured makes `git cl
archive` crash:

Traceback (most recent call last):
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 267, in print_notice_and_exit
    yield
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 5553, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 5535, in main
    return dispatcher.execute(OptionParser(), argv)
  File "/usr/local/google/home/fmayer/depot_tools/subcommand.py", line 252, in execute
    return command(parser, args[1:])
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 252, in _inner
    return self._collect_metrics(func, command_name, *args, **kwargs)
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 232, in _collect_metrics
    gclient_utils.reraise(exception[0], exception[1], exception[2])
  File "/usr/local/google/home/fmayer/depot_tools/metrics.py", line 205, in _collect_metrics
    result = func(*args, **kwargs)
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 3786, in CMDarchive
    for cl, status in statuses
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 3599, in get_cl_statuses
    cl.EnsureAuthenticated(force=False, refresh=True)
  File "/usr/local/google/home/fmayer/depot_tools/git_cl.py", line 1757, in EnsureAuthenticated
    if urllib.parse.urlparse(self.GetRemoteUrl()).scheme != 'https':
  File "/usr/lib/python2.7/urlparse.py", line 143, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib/python2.7/urlparse.py", line 201, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'

Change-Id: I6f794f11d3ed5e3dbedfe278ded660fca32abda6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2030505
Commit-Queue: Florian Mayer <fmayer@google.com>
Reviewed-by: Anthony Polito <apolito@google.com>
5 years ago
..
gstools Scripts to download files from google storage based on sha1 sums 12 years ago
OWNERS [ninjalog_uploader] add tests 6 years ago
auth_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
bot_update_coverage_test.py Allow the bot_update api to not fetch tags from the git server. 6 years ago
cipd_bootstrap_test.py depot_tools: Run auth, cipd_bootstrap, git_number tests on python3. 6 years ago
detect_host_arch_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
download_from_google_storage_unittest.py gsutil: Decode output from subprocess. 6 years ago
fix_encoding_test.py Use assertEqual() rather than assertEquals() in Python tests. 6 years ago
gclient_eval_unittest.py Add support for multi argument ands and ors, and the same precedence with 6 years ago
gclient_paths_test.py depot_tools: Add tests for gclient_paths 5 years ago
gclient_scm_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
gclient_smoketest.py gclient: Make smoketests run on Windows. 5 years ago
gclient_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
gclient_utils_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
gerrit_util_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
git_cache_test.py Allow the bot_update api to not fetch tags from the git server. 6 years ago
git_cl_creds_check_report.txt git cl creds-check: improve report and give better recommendation. 8 years ago
git_cl_test.py Do not crash for non URL (i.e. SSH) remotes. 5 years ago
git_common_test.py Default to origin's default branch instead of always origin/master. 5 years ago
git_dates_test.py Use assertEqual() rather than assertEquals() in Python tests. 6 years ago
git_drover_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
git_footers_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
git_hyper_blame_test.py git-hyper-blame: Simplify code and tests. 5 years ago
git_map_test.py git-map: Refactor and add simple tests 5 years ago
git_number_test.py depot_tools: Run auth, cipd_bootstrap, git_number tests on python3. 6 years ago
git_rebase_update_test.py git-rebase-update: Make tests run on Python 3. 6 years ago
gsutil_test.py depot_tools: Make gsutil compatible with python3. 6 years ago
metrics_test.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago
ninjalog_uploader_test.py [ninjalog] fully anonymize build stats before sending 6 years ago
owners_finder_test.py Randomize results of git cl owners 6 years ago
owners_unittest.py depot_tools: Make owners tests run on Python 3 6 years ago
presubmit_unittest.py presubmit_support: Use single quotes and convert to ArgumentParser. 5 years ago
recipes_test.py [recipes] Remove deprecated (ignored) --use-bootstrap flag 6 years ago
roll_dep_test.py depot_tools: Run roll_dep tests on Python 3. 6 years ago
scm_unittest.py scm: Add GetAllFiles method. 5 years ago
subcommand_test.py subcommand: Add tests. 5 years ago
subprocess2_test.py subprocess2: Ensure environment keys and values are strings on Python 3 5 years ago
upload_to_google_storage_unittest.py gsutil: Decode output from subprocess. 6 years ago
watchlists_unittest.py depot_tools: Use mock from vpython (or unittest.mock) instead of third_party/mock 5 years ago