{{ message }}
Repository navigation
Add test for ssh auth - #1825
Merged
Merged
Conversation
Fixes an issue with 'APPVEYOR_REPO_COMMIT_MESSAGE' being included, causing test-env.sh failures
Contributor
Merged
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Jul 21, 2021
We double-quote one instance of the $sshurl variable added in commit 691de51 of PR git-lfs#4446, since all other instances of the variable are already quoted, and drop an unused "oid" variable added in the same commit. We also remove a "git lfs env" debugging statement left from the original introduction of the "batch transfers with ssh endpoint" test in commit c6feebf of PR git-lfs#1825.
pcal43
pushed a commit
to pcal43/git-lfs-hack
that referenced
this pull request
Jul 22, 2021
We double-quote one instance of the $sshurl variable added in commit 691de51 of PR git-lfs#4446, since all other instances of the variable are already quoted, and drop an unused "oid" variable added in the same commit. We also remove a "git lfs env" debugging statement left from the original introduction of the "batch transfers with ssh endpoint" test in commit c6feebf of PR git-lfs#1825.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Oct 7, 2024
In commit 32244d9 of PR git-lfs#1825 the APPVEYOR_REPO_COMMIT_MESSAGE variable was added to our CI test suite environment in order to demonstrate that a problem exposed by the prior commit 0951c69 in the same PR had been addresssed. Specifically, the earlier commit had the string "GIT_SSH" in its message, and the AppVeyor CI service automatically provided the message from the most recent commit in a Git branch under test in the APPVEYOR_REPO_COMMIT_MESSAGE environment variable. At the time, the Environ() function in our "lfs" package would populate map it returns with the names and values of any environment variables whose names or values contained the string "GIT_". The result was that the APPVEYOR_REPO_COMMIT_MESSAGE variable was included in the returned environment, which would cause the tests in what is now our t/t-env.sh test script to fail. The problem was resolved by adjusting the Environ() function to only include environment variables in its map when their name contained the string "GIT_". To validate this fix, our test script environment was updated to write a fixed value into the APPVEYOR_REPO_COMMIT_MESSAGE environment variable (overriding whatever the AppVeyor service set) with an example string containing the string "GIT_". The example string used was the commit message from the commit which exposed the problem. Subsequently, we further revised the Environ() function in commit f4f8fae of PR git-lfs#4269 so it only includes environment variables whose names start with "GIT_", excluding those whose names just include that string. As we no longer use the AppVeyor service since we migrated our CI jobs to GitHub Actions in PR git-lfs#3808, and because the intent of the APPVEYOR_REPO_COMMIT_MESSAGE variable is now somewhat obscure, we replace it with a dedicated TEST_GIT_EXAMPLE environment variable in our test scripts where the output of "git lfs env" is checked. We ensure the "GIT_" string is included in both the name and value of this variable, and we preface it with some comments to clarify its purpose. If a regression were ever to be introduced into the Environ() function such that it did not exclude environment variables with "GIT_" in their names or values, the tests in the t/t-env.sh and t/t-worktree.sh scripts should still catch the problem.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Oct 30, 2024
In commit 32244d9 of PR git-lfs#1825 the APPVEYOR_REPO_COMMIT_MESSAGE variable was added to our CI test suite environment in order to demonstrate that a problem exposed by the prior commit 0951c69 in the same PR had been addressed. Specifically, the earlier commit had the string "GIT_SSH" in its message, and the AppVeyor CI service automatically provided the message from the most recent commit in a Git branch under test in the APPVEYOR_REPO_COMMIT_MESSAGE environment variable. At the time, the Environ() function in our "lfs" package would populate the map it returns with the names and values of any environment variables whose names or values contained the string "GIT_". The result was that the APPVEYOR_REPO_COMMIT_MESSAGE variable was included in the returned environment, which would cause the tests in what is now our t/t-env.sh test script to fail. The problem was resolved by adjusting the Environ() function to only include environment variables in its map when their name contained the string "GIT_". To validate this fix, our test script environment was updated to write a fixed value into the APPVEYOR_REPO_COMMIT_MESSAGE environment variable (overriding whatever the AppVeyor service set) with an example string containing the string "GIT_". The example string used was the commit message from the commit which exposed the problem. Subsequently, we further revised the Environ() function in commit f4f8fae of PR git-lfs#4269 so it only includes environment variables whose names start with "GIT_", excluding those whose names just include that string. As we no longer use the AppVeyor service since we migrated our CI jobs to GitHub Actions in PR git-lfs#3808, and because the intent of the APPVEYOR_REPO_COMMIT_MESSAGE variable is now somewhat obscure, we replace it with a dedicated TEST_GIT_EXAMPLE environment variable in our test scripts where the output of "git lfs env" is checked. We ensure the "GIT_" string is included in both the name and value of this variable, and we preface it with some comments to clarify its purpose. If a regression were ever to be introduced into the Environ() function such that it did not exclude environment variables with "GIT_" in their names or values, the tests in the t/t-env.sh and t/t-worktree.sh scripts should still catch the problem.
chrisd8088
added a commit
to chrisd8088/git-lfs
that referenced
this pull request
Nov 5, 2024
In commit 32244d9 of PR git-lfs#1825 the APPVEYOR_REPO_COMMIT_MESSAGE variable was added to our CI test suite environment in order to demonstrate that a problem exposed by the prior commit 0951c69 in the same PR had been addressed. Specifically, the earlier commit had the string "GIT_SSH" in its message, and the AppVeyor CI service automatically provided the message from the most recent commit in a Git branch under test in the APPVEYOR_REPO_COMMIT_MESSAGE environment variable. At the time, the Environ() function in our "lfs" package would populate the map it returns with the names and values of any environment variables whose names or values contained the string "GIT_". The result was that the APPVEYOR_REPO_COMMIT_MESSAGE variable was included in the returned environment data, which would cause the tests in what is now our t/t-env.sh test script to fail. This problem was resolved by adjusting the Environ() function to only include environment variables in its map when their name contained the string "GIT_". To validate this fix, our test script environment was updated to write a fixed value into the APPVEYOR_REPO_COMMIT_MESSAGE environment variable (overriding whatever the AppVeyor service set) with an example string containing the string "GIT_". The example string used was the commit message from the commit which exposed the problem. Subsequently, we further revised the Environ() function in commit f4f8fae of PR git-lfs#4269 so it only includes environment variables whose names start with "GIT_", excluding those whose names merely contain that string. As we no longer use the AppVeyor service since we migrated our CI jobs to GitHub Actions in PR git-lfs#3808, and because the intent of the APPVEYOR_REPO_COMMIT_MESSAGE variable is now somewhat obscure, we replace it with a dedicated TEST_GIT_EXAMPLE environment variable that contains the "GIT_" string in both its name and value. We define this TEST_GIT_EXAMPLE variable only in the test scripts where the output of "git lfs env" is checked, and we preface its definition with some comments to clarify its purpose. If a regression were ever to be introduced into the Environ() function such that it did not exclude environment variables with "GIT_" in their names or values, the tests in the t/t-env.sh and t/t-worktree.sh scripts should detect the problem due to the presence of the TEST_GIT_EXAMPLE variable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This adds a test for accessing the batch api on an ssh endpoint. The test sets
GIT_SSHto a customssh-echocommand so we don't have to set up a real ssh server.