From e529a15dbcef15b21563b3b8fa9c47de02cbee08 Mon Sep 17 00:00:00 2001 From: atiratree Date: Thu, 26 Aug 2021 14:49:58 +0200 Subject: [PATCH] add a test for jsonpath template parsing to prevent regressions This behaviour was broken by commit 39cfe232325d66bcdbc935af7aaf7022562e7010 and PR kubernetes#98057 Kubernetes-commit: b79859cb12b19222fffc17481e1fe006819de63c --- util/jsonpath/jsonpath_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/util/jsonpath/jsonpath_test.go b/util/jsonpath/jsonpath_test.go index c7714ee8..197e73e8 100644 --- a/util/jsonpath/jsonpath_test.go +++ b/util/jsonpath/jsonpath_test.go @@ -280,6 +280,7 @@ func TestStructInput(t *testing.T) { missingKeyTests := []jsonpathTest{ {"nonexistent field", "{.hello}", storeData, "", false}, + {"nonexistent field 2", "before-{.hello}after", storeData, "before-after", false}, } testJSONPath(missingKeyTests, true, t)