#NEWLINE# @ skip_if_disabled #NEWLINE# def test_size_greater_2G_mysql( self ) : #NEWLINE# #INDENT# '\n        A test against the actual datastore backend for the registry\n        to ensure that the image size property is not truncated.\n\n        :see https://bugs.launchpad.net/glance/+bug/739433\n        ' #NEWLINE# self . cleanup ( ) #NEWLINE# self . start_servers ( ** self . __dict__ . copy ( ) ) #NEWLINE# headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/octet-stream' , #NEWLINE# 'X-Image-Meta-Location' : 'https://example.com/fakeimage' , #NEWLINE# 'X-Image-Meta-Size' : str ( FIVE_GB ) , #NEWLINE# 'X-Image-Meta-Name' : 'Image1' , #NEWLINE# 'X-Image-Meta-Is-Public' : 'True' , #NEWLINE# #UNINDENT# } #NEWLINE# path = ( 'https://%s:%d/v1/images' % ( '0.0.0.0' , response . api_port ) ) #NEWLINE# https = httplib2 . Http ( disable_ssl_certificate_validation = True ) #NEWLINE# ( response , content ) = https . request ( path , 'POST' , headers = headers ) #NEWLINE# self . assertEqual ( response . status , 201 ) #NEWLINE# path = response . get ( 'location' ) #NEWLINE# https = httplib2 . Http ( disable_ssl_certificate_validation = True ) #NEWLINE# ( response , content ) = https . request ( path , 'HEAD' ) #NEWLINE# self . assertEqual ( response . status , 200 ) #NEWLINE# self . assertEqual ( response [ 'x-image-meta-size' ] , str ( FIVE_GB ) ) #NEWLINE# self . assertEqual ( response [ 'x-image-meta-name' ] , 'Image1' ) #NEWLINE# self . assertEqual ( response [ 'x-image-meta-is_public' ] , 'True' ) #NEWLINE# self . stop_servers ( )