Skip to content

Commit ccbd379

Browse files
committed
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 <[email protected]>
1 parent 4b25bc2 commit ccbd379

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scalar.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,8 @@ static char *get_cache_key(const char *url)
545545
* The GVFS protocol is only supported via https://; For testing, we
546546
* also allow http://.
547547
*/
548-
if (can_url_support_gvfs(url)) {
548+
if (!git_env_bool("SCALAR_TEST_SKIP_VSTS_INFO", 0) &&
549+
can_url_support_gvfs(url)) {
549550
cp.git_cmd = 1;
550551
strvec_pushl(&cp.args, "gvfs-helper", "--remote", url,
551552
"endpoint", "vsts/info", NULL);

0 commit comments

Comments
 (0)