missing quotes in GIT_CREDENTIAL_ENV
echo without quotes removes newline, echo with quotes preserves it.
Previously failing test added
MODIFY
docker/git-credential-env
docker/git-credential-env
#!/bin/bash
-echo -e $GIT_CREDENTIAL_ENV
+echo -e "$GIT_CREDENTIAL_ENV"

ADD
tests/unit/test_docker.py
+"""Tests for docker bits"""
+
+import os
+from subprocess import check_output
+
+repo_root = os.path.abspath(
+ os.path.join(os.path.dirname(__file__), os.pardir, os.pardir)
+)
+
+
+def test_git_credential_env():
+ credential_env = "username=abc\npassword=def"
+ out = (
+ check_output(
+ os.path.join(repo_root, "docker", "git-credential-env"),
+ env={'GIT_CREDENTIAL_ENV': credential_env},
+ )
+ .decode()
+ .strip()
+ )
+ assert out == credential_env

missing quotes in GIT_CREDENTIAL_ENV

echo without quotes removes newline, echo with quotes preserves it.

Previously failing test added