Skip to content

Commit 380bb89

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 1db87ec commit 380bb89

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

0 commit comments

Comments
 (0)