Skip to content

Commit cb91c99

Browse files
author
Keerthan Reddy Mala
committed
tests(build): fix for internal registry access
1 parent e36f796 commit cb91c99

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

rootfs/api/tests/deployments/test_build.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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"""

rootfs/api/tests/test_build.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff 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"""

0 commit comments

Comments
 (0)