From c955c266ebd67b1c038821bb92d25d2c07da32c2 Mon Sep 17 00:00:00 2001 From: David Butenhof Date: Wed, 22 Mar 2023 07:28:45 -0400 Subject: [PATCH] New test case Confirm that multiple unacceptable JSON keys are collected across various levels of the JSON tree. --- lib/pbench/test/unit/server/test_datasets_metadata.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/pbench/test/unit/server/test_datasets_metadata.py b/lib/pbench/test/unit/server/test_datasets_metadata.py index 7e758a1f83..b584522164 100644 --- a/lib/pbench/test/unit/server/test_datasets_metadata.py +++ b/lib/pbench/test/unit/server/test_datasets_metadata.py @@ -339,6 +339,17 @@ def test_put_no_dataset(self, client, server_config, attach_dataset): ({"global": {"Ab.foo": True}}, "'Ab.foo'"), ({"global": {"ab@": True}}, "'ab@'"), ({"global": {"abc": {"#$": "bad key"}}}, "'#$'"), + ( + { + "global": { + "a": { + "#bad": {"still@bad": "ok", "good": True}, + ".no": {"Yes": 0, "no?": 1}, + } + } + }, + "'#bad', '.no', 'Yes', 'no?', 'still@bad'", + ), ({"global.AbC@foo=y": True}, "'global.AbC@foo=y'"), ({"global..foo": True}, "'global..foo'"), ),