Browse code

test sanity of safe vs latest version

Hanno Böck authored on24/03/2020 17:48:44
Showing1 changed files
... ...
@@ -62,6 +62,13 @@ class TestJsonLint(unittest.TestCase):
62 62
                                     msg="%s: Invalid old_safe ordering %s" %
63 63
                                     (item['name'], item['old_safe']))
64 64
 
65
+            # make sure latest is not outdated
66
+            if 'latest' in item and item['safe'] != "":
67
+                self.assertTrue(not versioncompare(item['safe'],
68
+                                                   item['latest']),
69
+                                msg="%s: Safe version %s newer than latest %s"
70
+                                % (item['name'], item['safe'], item['latest']))
71
+
65 72
             # subdir needs to be integer
66 73
             for det in item['detection']:
67 74
                 self.assertTrue(isinstance(det['subdir'], int),