fix(endpoints): appending dockerfile to api call
### Description of Changes this was not passing back the correct path for the dockerfile
This commit is contained in:
parent
193b6cc94d
commit
d4177e6e33
2 changed files with 15 additions and 8 deletions
|
@ -4,9 +4,10 @@ from endpoints.api.build import RepositoryBuildList
|
|||
|
||||
|
||||
@pytest.mark.parametrize('request_json,subdir,context', [
|
||||
({}, "/Dockerfile", "/"),
|
||||
({"context": "/some_context"}, "/some_context/Dockerfile", "/some_context"),
|
||||
({"subdirectory": "/some_subdir/Dockerfile"}, "/some_subdir/Dockerfile", "/"),
|
||||
({}, '/Dockerfile', '/'),
|
||||
({'context': '/some_context'}, '/some_context/Dockerfile', '/some_context'),
|
||||
({'subdirectory': 'some_context'}, 'some_context/Dockerfile', 'some_context'),
|
||||
({'subdirectory': 'some_context/'}, 'some_context/Dockerfile', 'some_context/'),
|
||||
])
|
||||
def test_extract_dockerfile_args(request_json, subdir, context):
|
||||
actual_context, actual_subdir = RepositoryBuildList.get_dockerfile_context(request_json)
|
||||
|
|
Reference in a new issue