From b79859cb12b19222fffc17481e1fe006819de63c 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 --- staging/src/k8s.io/client-go/util/jsonpath/jsonpath_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/staging/src/k8s.io/client-go/util/jsonpath/jsonpath_test.go b/staging/src/k8s.io/client-go/util/jsonpath/jsonpath_test.go index c7714ee8346..197e73e84dd 100644 --- a/staging/src/k8s.io/client-go/util/jsonpath/jsonpath_test.go +++ b/staging/src/k8s.io/client-go/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)