Remove test references to old CI#5615
Conversation
This test has been broken for a while, but we hadn't noticed because of an unexpected way of skipping the test for TravisCI, which we no longer use. In TravisCI, the `TRAVIS` environment variable is set to 1. However, in other environments, it is usually not set. As a consequence, it expands to the empty string. The `if` statement in sh is not the `if` statement in C, and thus it does not take a boolean value, and "1" would not be a valid value here. The empty string is a valid value, though, and it is interpreted as a no-op command, much like `:` or `true`, which are the customary ways to write this. Because this command always succeeds, we always skip this branch, and the body of the test is not executed. After removing this, our test fails because `assert_clean_status` is not run in a Git repository. We clearly wanted to run it in `$newclonedir`, so let's do that. In addition, the text "Git LFS:" is no longer printed, so don't look for it. With those changes, this test now passes.
We no longer use Appveyor or TravisCI, so let's remove references to them in the testsuite.
9bedb51 to
5302960
Compare
|
I think PR #5882 has now addressed the Travis CI portions of this draft PR, and it turns out the AppVeyor bits are actually still important (although we don't use that service anymore), so I'd suggest we might be able to close this PR. For reference, I've included below the patch I expect to use to deal with the seemingly AppVeyor-related environment variable. I'll put this into a future PR, but the crux of it is that the This was originally a problem exposed by commit 0951c69 in PR #1825, and then quickly addressed in commit 32244d9 of the same PR, at which time the fake AppVeyor variable added to the test suite's environment to confirm that the problem was fixed. Specifically, the earlier commit had the string Anyway, as I said, I have another round or two of test suite fixups underway, and I'll deal with this environment variable curiosity in those with a change like the one below. diff --git a/t/t-env.sh b/t/t-env.sh
index 34fe0575..cfdadea9 100755
--- a/t/t-env.sh
+++ b/t/t-env.sh
@@ -10,6 +10,10 @@ if [ "$IS_WINDOWS" -eq 1 ]; then
export MSYS2_ENV_CONV_EXCL="GIT_LFS_TEST_DIR"
fi
+# The "git lfs env" command should ignore this environment variable
+# despite the "GIT_" strings in its name and value.
+export TEST_GIT_EXAMPLE="GIT_EXAMPLE"
+
begin_test "env with no remote"
(
set -e
diff --git a/t/t-worktree.sh b/t/t-worktree.sh
index ef237238..775067f8 100755
--- a/t/t-worktree.sh
+++ b/t/t-worktree.sh
@@ -11,6 +11,10 @@ if [ "$IS_WINDOWS" -eq 1 ]; then
export MSYS2_ENV_CONV_EXCL="GIT_LFS_TEST_DIR"
fi
+# The "git lfs env" command should ignore this environment variable
+# despite the "GIT_" strings in its name and value.
+export TEST_GIT_EXAMPLE="GIT_EXAMPLE"
+
begin_test "git worktree"
(
set -e
diff --git a/t/testenv.sh b/t/testenv.sh
index a63122ee..111d2024 100644
--- a/t/testenv.sh
+++ b/t/testenv.sh
@@ -152,7 +152,6 @@ GIT_CONFIG_NOSYSTEM=1
GIT_TERMINAL_PROMPT=0
GIT_SSH=lfs-ssh-echo
GIT_TEMPLATE_DIR="$(native_path "$ROOTDIR/t/fixtures/templates")"
-APPVEYOR_REPO_COMMIT_MESSAGE="test: env test should look for GIT_SSH too"
LC_ALL=C
export CREDSDIR
@@ -160,7 +159,6 @@ export GIT_LFS_FORCE_PROGRESS
export GIT_CONFIG_NOSYSTEM
export GIT_SSH
export GIT_TEMPLATE_DIR
-export APPVEYOR_REPO_COMMIT_MESSAGE
export LC_ALL
# Don't fail if run under git rebase -x. |
|
Great, I'll close this, then. |
We no longer use Appveyor or TravisCI, so let's remove references to them in the testsuite.