summaryrefslogtreecommitdiffstats
path: root/tests/py/any/meta.t.json
diff options
context:
space:
mode:
authorMartin Gignac <martin.gignac@gmail.com>2022-04-09 08:57:02 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2022-04-10 17:19:34 +0200
commitc36ecfc21ba87b11bdf714250e86afcc075280cd (patch)
tree1c65ace0e2051df4207859ee7df1a1ef03f61a7a /tests/py/any/meta.t.json
parent6fa4ff56385831f01bd9d993178969a4eddbcdbf (diff)
tests: py: Add meta time tests without 'meta' keyword
v1.0.2 of 'nft' fails on 'time < "2022-07-01 11:00:00"' but succeeds when 'meta' is specified ('meta time < "2022-07-01 11:00:00"'). This extends coverage by testing 'time' without 'meta'. Signed-off-by: Martin Gignac <martin.gignac@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'tests/py/any/meta.t.json')
-rw-r--r--tests/py/any/meta.t.json36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/py/any/meta.t.json b/tests/py/any/meta.t.json
index 5472dc85..4734bbf9 100644
--- a/tests/py/any/meta.t.json
+++ b/tests/py/any/meta.t.json
@@ -2722,3 +2722,39 @@
"drop": null
}
]
+
+# time < "2022-07-01 11:00:00" accept
+[
+ {
+ "match": {
+ "left": {
+ "meta": {
+ "key": "time"
+ }
+ },
+ "op": "<",
+ "right": "2022-07-01 11:00:00"
+ }
+ },
+ {
+ "accept": null
+ }
+]
+
+# time > "2022-07-01 11:00:00" accept
+[
+ {
+ "match": {
+ "left": {
+ "meta": {
+ "key": "time"
+ }
+ },
+ "op": ">",
+ "right": "2022-07-01 11:00:00"
+ }
+ },
+ {
+ "accept": null
+ }
+]