Skip to content

Commit f11a2df

Browse files
integration: Remove test_build_squash tests
The --squash flag is no longer supported with BuildKit. Signed-off-by: Ricardo Branco <rbranco@suse.de>
1 parent df3f8e2 commit f11a2df

2 files changed

Lines changed: 0 additions & 52 deletions

File tree

tests/integration/api_build_test.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -349,32 +349,6 @@ def test_build_with_extra_hosts(self):
349349
assert '127.0.0.1\textrahost.local.test' in logs
350350
assert '127.0.0.1\thello.world.test' in logs
351351

352-
@requires_experimental(until=None)
353-
@requires_api_version('1.25')
354-
def test_build_squash(self):
355-
script = io.BytesIO('\n'.join([
356-
'FROM busybox',
357-
'RUN echo blah > /file_1',
358-
'RUN echo blahblah > /file_2',
359-
'RUN echo blahblahblah > /file_3'
360-
]).encode('ascii'))
361-
362-
def build_squashed(squash):
363-
tag = 'squash' if squash else 'nosquash'
364-
stream = self.client.build(
365-
fileobj=script, tag=tag, squash=squash
366-
)
367-
self.tmp_imgs.append(tag)
368-
for _chunk in stream:
369-
pass
370-
371-
return self.client.inspect_image(tag)
372-
373-
non_squashed = build_squashed(False)
374-
squashed = build_squashed(True)
375-
assert len(non_squashed['RootFS']['Layers']) == 4
376-
assert len(squashed['RootFS']['Layers']) == 2
377-
378352
def test_build_stderr_data(self):
379353
control_chars = ['\x1b[91m', '\x1b[0m']
380354
snippet = 'Ancient Temple (Mystic Oriental Dream ~ Ancient Temple)'

tests/ssh/api_build_test.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -340,32 +340,6 @@ def test_build_with_extra_hosts(self):
340340
assert '127.0.0.1\textrahost.local.test' in logs
341341
assert '127.0.0.1\thello.world.test' in logs
342342

343-
@requires_experimental(until=None)
344-
@requires_api_version('1.25')
345-
def test_build_squash(self):
346-
script = io.BytesIO('\n'.join([
347-
'FROM busybox',
348-
'RUN echo blah > /file_1',
349-
'RUN echo blahblah > /file_2',
350-
'RUN echo blahblahblah > /file_3'
351-
]).encode('ascii'))
352-
353-
def build_squashed(squash):
354-
tag = 'squash' if squash else 'nosquash'
355-
stream = self.client.build(
356-
fileobj=script, tag=tag, squash=squash
357-
)
358-
self.tmp_imgs.append(tag)
359-
for _chunk in stream:
360-
pass
361-
362-
return self.client.inspect_image(tag)
363-
364-
non_squashed = build_squashed(False)
365-
squashed = build_squashed(True)
366-
assert len(non_squashed['RootFS']['Layers']) == 4
367-
assert len(squashed['RootFS']['Layers']) == 2
368-
369343
def test_build_stderr_data(self):
370344
control_chars = ['\x1b[91m', '\x1b[0m']
371345
snippet = 'Ancient Temple (Mystic Oriental Dream ~ Ancient Temple)'

0 commit comments

Comments
 (0)