From 662745c34597f83197d819c69d8c57c3ff8bcd88 Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Wed, 12 May 2021 17:59:58 +0200 Subject: [PATCH] scalar: add a test toggle to skip accessing the vsts/info endpoint In Scalar's functional tests, we do not do anything with authentication. Therefore, we do want to avoid accessing the `vsts/info` endpoint because it requires authentication even on otherwise public repositories. Let's introduce the environment variable `SCALAR_TEST_SKIP_VSTS_INFO` which can be set to `true` to simply skip that step (and force the `url_*` style repository IDs instead of `id_*` whenever possible). Signed-off-by: Johannes Schindelin --- scalar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scalar.c b/scalar.c index a1f367cbf2be85..468b8698a873f8 100644 --- a/scalar.c +++ b/scalar.c @@ -522,7 +522,8 @@ static char *get_cache_key(const char *url) * The GVFS protocol is only supported via https://; For testing, we * also allow http://. */ - if (can_url_support_gvfs(url)) { + if (!git_env_bool("SCALAR_TEST_SKIP_VSTS_INFO", 0) && + can_url_support_gvfs(url)) { cp.git_cmd = 1; strvec_pushl(&cp.args, "gvfs-helper", "--remote", url, "endpoint", "vsts/info", NULL);