Skip to content

Commit 7cd9b1f

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 bd50de7 commit 7cd9b1f

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
@@ -544,7 +544,8 @@ static char *get_cache_key(const char *url)
544544
* The GVFS protocol is only supported via https://; For testing, we
545545
* also allow http://.
546546
*/
547-
if (can_url_support_gvfs(url)) {
547+
if (!git_env_bool("SCALAR_TEST_SKIP_VSTS_INFO", 0) &&
548+
can_url_support_gvfs(url)) {
548549
cp.git_cmd = 1;
549550
strvec_pushl(&cp.args, "gvfs-helper", "--remote", url,
550551
"endpoint", "vsts/info", NULL);

0 commit comments

Comments
 (0)