Extend unit test for larger than GCM encrytion size
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 27 Jan 2020 16:05:18 +0000 (17:05 +0100)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 27 Jan 2020 17:23:24 +0000 (18:23 +0100)
Add a few corner cases in addition to the existing test:

* MAX_SIZE-1
* MAX_SIZE
* 2*MAX_SIZE + 1

testing/test_deltatar.py

index 9ae02a7..75e53c2 100644 (file)
@@ -191,8 +191,11 @@ class DeltaTarTest(BaseTest):
         self.hash = dict ()
         os.makedirs ("source_dir2")
         for f, s in [("empty"          , 0)             # 1 tar objects
-                    ,("slightly_larger", new_max + 1)   # 2
-                    ,("twice"          , 2 * new_max)   # 3
+                    ,("almost_large"   , new_max - 1)   # 2
+                    ,("large"          , new_max)       # 3
+                    ,("slightly_larger", new_max + 1)   # 4
+                    ,("twice"          , 2 * new_max)   # 5
+                    ,("twice_plus_one" , (2 * new_max) + 1)   # 6
                     ]:
             f = "source_dir2/%s" % f
             self.hash [f] = self.create_file (f, s)