]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
tests/py: Adjust JSON for changes in any/ct.t
authorPhil Sutter <phil@nwl.cc>
Mon, 28 May 2018 16:51:07 +0000 (18:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jun 2018 07:16:48 +0000 (09:16 +0200)
Commit 71624f25f22b1 ("tests: py: add expires tests with different time
bases") removed two testcases and added five other ones, adjust JSON
equivalent and recorded output to those changes.

Fixes: 71624f25f22b1 ("tests: py: add expires tests with different time bases")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
tests/py/any/ct.t.json
tests/py/any/ct.t.json.output

index 83f1bbbd8e36769ff7c897a9330e10ed6c7a0828..3ec00ab3b5d783dffaf590bd2086ba64e5cdfc68 100644 (file)
     }
 ]
 
-# ct expiration 30
+# ct expiration 30s
 [
     {
         "match": {
                     "key": "expiration"
                 }
             },
-            "right": 30
+            "right": "30s"
         }
     }
 ]
 
-# ct expiration 22
+# ct expiration 30000ms
 [
     {
         "match": {
                     "key": "expiration"
                 }
             },
-            "right": 22
+            "right": "30000ms"
+        }
+    }
+]
+
+# ct expiration 1m-1h
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "key": "expiration"
+                }
+            },
+            "right": {
+                "range": [ "1m", "1h" ]
+            }
+        }
+    }
+]
+
+# ct expiration > 4d23h59m59s
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "key": "expiration"
+                }
+            },
+           "op": ">",
+            "right": "4d23h59m59s"
         }
     }
 ]
index 01dbb486988e6b8525d6580c8dbbd2493a1802e2..ce33a6810a496176fb6f84ca297f8f7f8dc4ae39 100644 (file)
     }
 ]
 
+# ct expiration 30s
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "key": "expiration"
+                }
+            },
+            "right": 30
+        }
+    }
+]
+
+# ct expiration 30000ms
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "key": "expiration"
+                }
+            },
+            "right": 30
+        }
+    }
+]
+
+# ct expiration 1m-1h
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "key": "expiration"
+                }
+            },
+            "right": {
+                "range": [ 60, 3600 ]
+            }
+        }
+    }
+]
+
+# ct expiration > 4d23h59m59s
+[
+    {
+        "match": {
+            "left": {
+                "ct": {
+                    "key": "expiration"
+                }
+            },
+           "op": ">",
+            "right": 431999
+        }
+    }
+]
+
 # ct state . ct mark { new . 0x12345678}
 [
     {