@@ -310,7 +310,7 @@ func TestApplySet_Prune(t *testing.T) {
310310
311311 // This CM will be pruned
312312 pruneCM := configMap ("prune-cm" , "default" )
313- pruneCM .Unstructured . SetLabels (map [string ]string {
313+ pruneCM .SetLabels (map [string ]string {
314314 ApplysetPartOfLabel : "applyset-wHf5Gity0G0nPN34KuNBIBBEOu2H9ED2KqsblMPFygM-v1" ,
315315 })
316316 aset , dynamicClient := newTestApplySet (t , parent , pruneCM )
@@ -437,11 +437,11 @@ func TestApplySet_PruneMultiNamespace(t *testing.T) {
437437
438438 // These CMs will be pruned
439439 pruneCM1 := configMap ("prune-cm" , "ns1" )
440- pruneCM1 .Unstructured . SetLabels (map [string ]string {
440+ pruneCM1 .SetLabels (map [string ]string {
441441 ApplysetPartOfLabel : "applyset-wHf5Gity0G0nPN34KuNBIBBEOu2H9ED2KqsblMPFygM-v1" ,
442442 })
443443 pruneCM2 := configMap ("prune-cm" , "ns2" )
444- pruneCM2 .Unstructured . SetLabels (map [string ]string {
444+ pruneCM2 .SetLabels (map [string ]string {
445445 ApplysetPartOfLabel : "applyset-wHf5Gity0G0nPN34KuNBIBBEOu2H9ED2KqsblMPFygM-v1" ,
446446 })
447447 aset , dynamicClient := newTestApplySet (t , parent , pruneCM1 , pruneCM2 )
@@ -501,7 +501,7 @@ func TestApplySet_PruneMultiNamespace(t *testing.T) {
501501 return true , & parentPatch , nil
502502 })
503503
504- var pruned int = 0
504+ var pruned = 0
505505 dynamicClient .PrependReactor ("delete" , "configmaps" , func (action k8stesting.Action ) (handled bool , ret runtime.Object , err error ) {
506506 deleteAction := action .(k8stesting.DeleteAction )
507507 assert .Equal (t , "prune-cm" , deleteAction .GetName ())
@@ -525,11 +525,11 @@ func TestApplySet_PruneOldNamespace(t *testing.T) {
525525
526526 // CM in old namespace should be pruned
527527 pruneCM1 := configMap ("prune-cm" , "oldns1" )
528- pruneCM1 .Unstructured . SetLabels (map [string ]string {
528+ pruneCM1 .SetLabels (map [string ]string {
529529 ApplysetPartOfLabel : "applyset-wHf5Gity0G0nPN34KuNBIBBEOu2H9ED2KqsblMPFygM-v1" ,
530530 })
531531 pruneCM2 := configMap ("prune-cm" , "ns2" )
532- pruneCM2 .Unstructured . SetLabels (map [string ]string {
532+ pruneCM2 .SetLabels (map [string ]string {
533533 ApplysetPartOfLabel : "applyset-wHf5Gity0G0nPN34KuNBIBBEOu2H9ED2KqsblMPFygM-v1" ,
534534 })
535535 aset , dynamicClient := newTestApplySet (t , parent , pruneCM1 , pruneCM2 )
@@ -589,7 +589,7 @@ func TestApplySet_PruneOldNamespace(t *testing.T) {
589589 return true , & parentPatch , nil
590590 })
591591
592- var pruned int = 0
592+ var pruned = 0
593593 dynamicClient .PrependReactor ("delete" , "configmaps" , func (action k8stesting.Action ) (handled bool , ret runtime.Object , err error ) {
594594 deleteAction := action .(k8stesting.DeleteAction )
595595 assert .Equal (t , "prune-cm" , deleteAction .GetName ())
@@ -613,7 +613,7 @@ func TestApplySet_PruneOldGVKs(t *testing.T) {
613613
614614 // Foo type should be pruned
615615 pruneFoo := foo ("prune-foo" , "ns1" )
616- pruneFoo .Unstructured . SetLabels (map [string ]string {
616+ pruneFoo .SetLabels (map [string ]string {
617617 ApplysetPartOfLabel : "applyset-wHf5Gity0G0nPN34KuNBIBBEOu2H9ED2KqsblMPFygM-v1" ,
618618 })
619619 aset , dynamicClient := newTestApplySet (t , parent , pruneFoo )
@@ -659,7 +659,7 @@ func TestApplySet_PruneOldGVKs(t *testing.T) {
659659 return true , & parentPatch , nil
660660 })
661661
662- var pruned int = 0
662+ var pruned = 0
663663 dynamicClient .PrependReactor ("delete" , "foos" , func (action k8stesting.Action ) (handled bool , ret runtime.Object , err error ) {
664664 deleteAction := action .(k8stesting.DeleteAction )
665665 assert .Equal (t , "prune-foo" , deleteAction .GetName ())
0 commit comments