def test_there_should_be_a_marker_file_in_the_squashed_layer(self):

        dockerfile = '''
        FROM %s
        RUN touch /somefile_layer1
        RUN rm /somefile_layer1
        RUN touch /somefile_layer3
        ''' % TestIntegSquash.BUSYBOX_IMAGE

        with self.Image(dockerfile) as image:
            with self.SquashedImage(image, 2) as squashed_image:
                squashed_image.assertFileDoesNotExist('somefile_layer1')
                squashed_image.assertFileExists('somefile_layer3')
                squashed_image.assertFileExists('.wh.somefile_layer1')
                squashed_image.assertFileIsNotHardLink('.wh.somefile_layer1')

                with self.Container(squashed_image) as container:
                    container.assertFileExists('somefile_layer3')
                    container.assertFileDoesNotExist('somefile_layer1')

                    # We should have one layer less in the image
                    self.assertEqual(
                        len(squashed_image.layers), len(image.layers) - 1)
Here we're testing that the squashed layer should contain a '.wh.somefile_layer1'
dataset/ETHPy150Open goldmann/docker-squash/tests/test_integ_squash.py/TestIntegSquash.test_there_should_be_a_marker_file_in_the_squashed_layer