File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11"""Test main handlers"""
22
3+ import re
34import time
45from urllib .parse import quote , urlparse
56
89from bs4 import BeautifulSoup
910
1011from binderhub import __version__ as binder_version
12+ from binderhub .build import KubernetesBuildExecutor
13+ from binderhub .build_local import LocalRepo2dockerBuild
1114
1215from .utils import async_requests
1316
@@ -103,12 +106,18 @@ async def test_about_handler(app):
103106
104107@pytest .mark .remote
105108async def test_versions_handler (app ):
109+ print (app .build_class == LocalRepo2dockerBuild )
110+
106111 # Check that the about page loads
107112 r = await async_requests .get (app .url + "/versions" )
108113 assert r .status_code == 200
109114
110115 data = r .json ()
111- assert data ["builder" ] == app .build_image
116+ # Versions is different for KubernetesExecutor and LocalRepo2dockerBuild
117+ if app .build_class == KubernetesBuildExecutor :
118+ assert data ["builder" ] == app .build_image
119+ else :
120+ assert re .match (r"\d+\.\d+\.\d+(-\w+)?$" , data ["builder" ])
112121 assert data ["binderhub" ].split ("+" )[0 ] == binder_version .split ("+" )[0 ]
113122
114123
You can’t perform that action at this time.
0 commit comments