Skip to content

Commit e666855

Browse files
committed
git_credentials must be a string, don't cast
1 parent 60429f7 commit e666855

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

binderhub/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from kubernetes import client, watch
1717
from tornado.ioloop import IOLoop
1818
from tornado.log import app_log
19-
from traitlets import Any, Bool, CUnicode, Dict, Integer, Unicode, default
19+
from traitlets import Any, Bool, Dict, Integer, Unicode, default
2020
from traitlets.config import LoggingConfigurable
2121

2222
from .utils import KUBE_REQUEST_TIMEOUT, rendezvous_rank
@@ -75,7 +75,7 @@ class BuildExecutor(LoggingConfigurable):
7575

7676
image_name = Unicode(help="Full name of the image to build. Includes the tag.")
7777

78-
git_credentials = CUnicode(
78+
git_credentials = Unicode(
7979
"",
8080
allow_none=True,
8181
help=(

binderhub/tests/test_build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ def test_sticky_builds_affinity():
176176

177177

178178
def test_git_credentials_passed_to_podspec_upon_submit():
179-
git_credentials = {
179+
git_credentials = """{
180180
"client_id": "my_username",
181181
"access_token": "my_access_token",
182-
}
182+
}"""
183183

184184
mock_k8s_api = _list_dind_pods_mock()
185185

@@ -212,7 +212,7 @@ def test_git_credentials_passed_to_podspec_upon_submit():
212212

213213
env = {env_var.name: env_var.value for env_var in pod.spec.containers[0].env}
214214

215-
assert env["GIT_CREDENTIAL_ENV"] == str(git_credentials)
215+
assert env["GIT_CREDENTIAL_ENV"] == git_credentials
216216

217217

218218
async def test_local_repo2docker_build():

0 commit comments

Comments
 (0)