[nft PATCH 12/14] tests/py: Adjust JSON for changes in any/ct.t

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 tests/py/any/ct.t.json        | 39 ++++++++++++++++++++---
 tests/py/any/ct.t.json.output | 59 +++++++++++++++++++++++++++++++++++
 2 files changed, 94 insertions(+), 4 deletions(-)

diff --git a/tests/py/any/ct.t.json b/tests/py/any/ct.t.json
index 83f1bbbd8e367..3ec00ab3b5d78 100644
--- a/tests/py/any/ct.t.json
+++ b/tests/py/any/ct.t.json
@@ -708,7 +708,7 @@
     }
 ]
 
-# ct expiration 30
+# ct expiration 30s
 [
     {
         "match": {
@@ -717,12 +717,12 @@
                     "key": "expiration"
                 }
             },
-            "right": 30
+            "right": "30s"
         }
     }
 ]
 
-# ct expiration 22
+# ct expiration 30000ms
 [
     {
         "match": {
@@ -731,7 +731,38 @@
                     "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"
         }
     }
 ]
diff --git a/tests/py/any/ct.t.json.output b/tests/py/any/ct.t.json.output
index 01dbb486988e6..ce33a6810a496 100644
--- a/tests/py/any/ct.t.json.output
+++ b/tests/py/any/ct.t.json.output
@@ -400,6 +400,65 @@
     }
 ]
 
+# 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}
 [
     {
-- 
2.17.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux