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 routines for checking protocol disabling.
# Test clone/fetch/push with GIT_ALLOW_PROTOCOL whitelist # Test clone/fetch/push with GIT_ALLOW_PROTOCOL environment variable
test_whitelist () { test_allow_var () {
desc=$1 desc=$1
proto=$2 proto=$2
url=$3 url=$3
@ -183,7 +183,7 @@ test_config () {
# $2 - machine-readable name of the protocol # $2 - machine-readable name of the protocol
# $3 - the URL to try cloning # $3 - the URL to try cloning
test_proto () { test_proto () {
test_whitelist "$@" test_allow_var "$@"
test_config "$@" 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_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 \ test_must_fail env GIT_ALLOW_PROTOCOL=http:https \
GIT_SMART_HTTP=0 \ GIT_SMART_HTTP=0 \
git clone "$HTTPD_URL/ftp-redir/repo.git" 2>stderr && git clone "$HTTPD_URL/ftp-redir/repo.git" 2>stderr &&

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
test_description='test protocol whitelisting with submodules' test_description='test protocol filtering with submodules'
. ./test-lib.sh . ./test-lib.sh
. "$TEST_DIRECTORY"/lib-proto-disable.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_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 GIT_ALLOW_PROTOCOL=ext git -C dst submodule update ext-module
' '

View File

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