e30cd931d1
users can only specify the folder and the dockerfile must be names "Dockerfile" this allows users to specify the file and it can be called "Dockerfile" or <some name>.Dockerfile
15 lines
398 B
Python
15 lines
398 B
Python
import pytest
|
|
|
|
from buildtrigger.basehandler import BuildTriggerHandler
|
|
|
|
|
|
@pytest.mark.parametrize('input,output', [
|
|
("Dockerfile", True),
|
|
("server.Dockerfile", True),
|
|
(u"Dockerfile", True),
|
|
(u"server.Dockerfile", True),
|
|
("bad file name", False),
|
|
(u"bad file name", False),
|
|
])
|
|
def test_path_is_dockerfile(input, output):
|
|
assert BuildTriggerHandler.path_is_dockerfile(input) == output
|