Skip to content

Commit c0755e8

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 46afbd6 commit c0755e8

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
@@ -529,7 +529,8 @@ static char *get_cache_key(const char *url)
529529
* The GVFS protocol is only supported via https://; For testing, we
530530
* also allow http://.
531531
*/
532-
if (can_url_support_gvfs(url)) {
532+
if (!git_env_bool("SCALAR_TEST_SKIP_VSTS_INFO", 0) &&
533+
can_url_support_gvfs(url)) {
533534
cp.git_cmd = 1;
534535
strvec_pushl(&cp.args, "gvfs-helper", "--remote", url,
535536
"endpoint", "vsts/info", NULL);

0 commit comments

Comments
 (0)