Fix API exception in trigger setup due to invalid Dockerfile path
This commit is contained in:
parent
04c9b6568c
commit
a15abd3b5c
5 changed files with 10 additions and 4 deletions
|
@ -23,7 +23,7 @@ def get_repo_path_contents(path, revision):
|
|||
return (True, data, None)
|
||||
|
||||
def get_raw_path_contents(path, revision):
|
||||
if path == '/Dockerfile':
|
||||
if path == 'Dockerfile':
|
||||
return (True, 'hello world', None)
|
||||
|
||||
if path == 'somesubdir/Dockerfile':
|
||||
|
|
|
@ -119,7 +119,7 @@ def get_mock_github():
|
|||
return [master, otherbranch]
|
||||
|
||||
def get_file_contents_mock(filepath):
|
||||
if filepath == '/Dockerfile':
|
||||
if filepath == 'Dockerfile':
|
||||
m = Mock()
|
||||
m.content = 'hello world'
|
||||
return m
|
||||
|
|
|
@ -151,7 +151,7 @@ def gettag_mock(repo_id, tag):
|
|||
}
|
||||
|
||||
def getrawfile_mock(repo_id, branch_name, path):
|
||||
if path == '/Dockerfile':
|
||||
if path == 'Dockerfile':
|
||||
return 'hello world'
|
||||
|
||||
if path == 'somesubdir/Dockerfile':
|
||||
|
|
Reference in a new issue