#NEWLINE# @ requires_internet #NEWLINE# @ pytest . mark . parametrize ( 'source_params' , [ { #NEWLINE# #INDENT# 'provider' : 'git' , #NEWLINE# 'uri' : DOCKERFILE_GIT , #NEWLINE# 'provider_params' : { #NEWLINE# #INDENT# 'git_commit' : 'error-build' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'provider' : 'path' , #NEWLINE# 'uri' : ( 'file://' + DOCKERFILE_ERROR_BUILD_PATH ) , #NEWLINE# #UNINDENT# } ] ) #NEWLINE# def test_build_bad_git_commit_dockerfile( tmpdir , source_params ) : #NEWLINE# #INDENT# provided_image = 'test-build:test_tag' #NEWLINE# if MOCK : #NEWLINE# #INDENT# mock_docker ( build_should_fail = True , provided_image_repotags = provided_image ) #NEWLINE# #UNINDENT# source_params . update ( { #NEWLINE# #INDENT# 'tmpdir' : str ( tmpdir ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# s = get_source_instance_for ( source_params ) #NEWLINE# b = InsideBuilder ( tmpdir , provided_image ) #NEWLINE# build_result = b . build ( ) #NEWLINE# assert build_result . is_failed ( )