File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -92,12 +92,13 @@ func TestValidateManifestMissingData(t *testing.T) {
9292 }
9393
9494 for _ , test := range tests {
95+ test := test
9596 name := fmt .Sprintf ("manifest missing %s" , strings .Join (test .missingFields , "." ))
97+
9698 t .Run (
9799 name ,
98100 func (t * testing.T ) {
99101 t .Parallel ()
100- test := test
101102 configmap := * createExConfigMap ("configmap1" )
102103 err := unstructured .SetNestedField (configmap , "" , test .missingFields ... )
103104 if err != nil {
@@ -128,12 +129,14 @@ func TestValidatePatchMissingData(t *testing.T) {
128129 }
129130
130131 for _ , test := range tests {
132+ test := test
131133 name := fmt .Sprintf ("patch missing %s" , strings .Join (test .missingFields , "." ))
134+
132135 t .Run (
133136 name ,
134137 func (t * testing.T ) {
135138 t .Parallel ()
136- test := test
139+
137140 manifests := []map [string ]interface {}{
138141 * createExConfigMap ("configmap1" ), * createExConfigMap ("configmap2" ),
139142 }
@@ -177,12 +180,14 @@ func TestValidatePatchInvalidSingleManifest(t *testing.T) {
177180 }
178181
179182 for _ , test := range tests {
183+ test := test
180184 name := fmt .Sprintf ("patch invalid %s" , strings .Join (test .invalidFields , "." ))
185+
181186 t .Run (
182187 name ,
183188 func (t * testing.T ) {
184189 t .Parallel ()
185- test := test
190+
186191 manifests := []map [string ]interface {}{* createExConfigMap ("configmap1" )}
187192 patch := map [string ]interface {}{
188193 "apiVersion" : "v1" ,
You can’t perform that action at this time.
0 commit comments