kopia lustrzana https://github.com/jupyterhub/repo2docker
22 wiersze
499 B
Python
22 wiersze
499 B
Python
|
"""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
|