Add an extra root dir test
This commit is contained in:
parent
2ccbea95a5
commit
cc9d5798b3
1 changed files with 13 additions and 0 deletions
|
@ -337,5 +337,18 @@ class TestStreamLayerMerger(unittest.TestCase):
|
|||
self.assertHasFile(squashed, 'foobar/baz/some_file', 'foo')
|
||||
self.assertDoesNotHaveFile(squashed, 'foo/another_file')
|
||||
|
||||
def test_delete_root_directory(self):
|
||||
third_layer = self.create_layer(
|
||||
foo = 'build/first_file',
|
||||
bar = 'build/second_file')
|
||||
|
||||
second_layer = self.create_layer(
|
||||
_ = 'build')
|
||||
|
||||
squashed = self.squash_layers([second_layer, third_layer])
|
||||
|
||||
self.assertDoesNotHaveFile(squashed, 'build/first_file')
|
||||
self.assertDoesNotHaveFile(squashed, 'build/second_file')
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
|
Reference in a new issue