t: avoid "whitelist"

The word "whitelist" has cultural implications that are not inclusive.
Thankfully, it is not difficult to reword and avoid its use.

Focus on changes in the test scripts, since most of the changes are in
comments and test names. The renamed test_allow_var helper is only used
once inside the widely-used test_proto helper.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Derrick Stolee 2022-07-19 18:32:16 +00:00 committed by Junio C Hamano
parent 559c2c3d2a
commit 0011f94a4f
4 changed files with 7 additions and 8 deletions

View File

@ -1,7 +1,7 @@
# Test routines for checking protocol disabling.
# Test clone/fetch/push with GIT_ALLOW_PROTOCOL whitelist
test_whitelist () {
# Test clone/fetch/push with GIT_ALLOW_PROTOCOL environment variable
test_allow_var () {
desc=$1
proto=$2
url=$3
@ -183,7 +183,7 @@ test_config () {
# $2 - machine-readable name of the protocol
# $3 - the URL to try cloning
test_proto () {
test_whitelist "$@"
test_allow_var "$@"
test_config "$@"
}

View File

@ -16,7 +16,7 @@ test_expect_success 'create git-accessible repo' '
test_proto "smart http" http "$HTTPD_URL/smart/repo.git"
test_expect_success 'curl redirects respect whitelist' '
test_expect_success 'http(s) transport respects GIT_ALLOW_PROTOCOL' '
test_must_fail env GIT_ALLOW_PROTOCOL=http:https \
GIT_SMART_HTTP=0 \
git clone "$HTTPD_URL/ftp-redir/repo.git" 2>stderr &&

View File

@ -1,6 +1,6 @@
#!/bin/sh
test_description='test protocol whitelisting with submodules'
test_description='test protocol filtering with submodules'
. ./test-lib.sh
. "$TEST_DIRECTORY"/lib-proto-disable.sh
@ -36,7 +36,7 @@ test_expect_success 'update of ext not allowed' '
test_must_fail git -C dst submodule update ext-module
'
test_expect_success 'user can override whitelist' '
test_expect_success 'user can filter protocols with GIT_ALLOW_PROTOCOL' '
GIT_ALLOW_PROTOCOL=ext git -C dst submodule update ext-module
'

View File

@ -651,8 +651,7 @@ test_set_prereq () {
# test_unset_prereq()
!*)
;;
# (Temporary?) whitelist of things we can't easily
# pretend not to support
# List of things we can't easily pretend to not support
SYMLINKS)
;;
# Inspecting whether GIT_TEST_FAIL_PREREQS is on