File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,9 +54,7 @@ def image(self):
5454 self .build .image .startswith (settings .REGISTRY_HOST ) or
5555 self .build .image .startswith (settings .REGISTRY_URL )
5656 ):
57- # strip registry information off first
58- image = self .build .image .replace ('{}/' .format (settings .REGISTRY_URL ), '' )
59- return image .replace ('{}/' .format (settings .REGISTRY_HOST ), '' )
57+ return self .build .image
6058
6159 # Sort out image information based on build type
6260 if self .build .type == 'dockerfile' :
Original file line number Diff line number Diff line change @@ -350,8 +350,7 @@ def test_build_image_in_registry(self, mock_requests):
350350
351351 build = Build .objects .get (uuid = response .data ['uuid' ])
352352 release = build .app .release_set .latest ()
353- # Registry host is internally stripped off
354- self .assertEqual (release .image , 'autotest/example' )
353+ self .assertEqual (release .image , image )
355354
356355 # post an image as a build using registry hostname + port
357356 url = "/v2/apps/test/builds" .format (** locals ())
@@ -362,8 +361,7 @@ def test_build_image_in_registry(self, mock_requests):
362361
363362 build = Build .objects .get (uuid = response .data ['uuid' ])
364363 release = build .app .release_set .latest ()
365- # Registry host + port is internally stripped off
366- self .assertEqual (release .image , 'autotest/example' )
364+ self .assertEqual (release .image , image )
367365
368366 def test_build_image_in_registry_with_auth (self , mock_requests ):
369367 """add authentication to the build"""
Original file line number Diff line number Diff line change @@ -346,8 +346,7 @@ def test_build_image_in_registry(self, mock_requests):
346346
347347 build = Build .objects .get (uuid = response .data ['uuid' ])
348348 release = build .app .release_set .latest ()
349- # Registry host is internally stripped off
350- self .assertEqual (release .image , 'autotest/example' )
349+ self .assertEqual (release .image , image )
351350
352351 # post an image as a build using registry hostname + port
353352 url = "/v2/apps/test/builds" .format (** locals ())
@@ -358,8 +357,7 @@ def test_build_image_in_registry(self, mock_requests):
358357
359358 build = Build .objects .get (uuid = response .data ['uuid' ])
360359 release = build .app .release_set .latest ()
361- # Registry host + port is internally stripped off
362- self .assertEqual (release .image , 'autotest/example' )
360+ self .assertEqual (release .image , image )
363361
364362 def test_build_image_in_registry_with_auth (self , mock_requests ):
365363 """add authentication to the build"""
You can’t perform that action at this time.
0 commit comments