@@ -615,7 +615,7 @@ func RunRolloutsTests(namespaceScopedParam bool) {
615615 },
616616 Metric : []rolloutsmanagerv1alpha1.Plugin {
617617 {
618- Name : "prometheus" ,
618+ Name : "argoproj-labs/ prometheus" ,
619619 Location : "https://github.com/argoproj-labs/sample-rollouts-metric-plugin/releases/download/v0.0.3/metric-plugin-linux-amd64" ,
620620 SHA256 : "4acc0e7a2c99bd8fe2d9b8ee6da08d531ee3a4373c55c77e3b5ee55c866fae69" ,
621621 }},
@@ -722,7 +722,7 @@ func RunRolloutsTests(namespaceScopedParam bool) {
722722 Plugins : rolloutsmanagerv1alpha1.Plugins {
723723 Metric : []rolloutsmanagerv1alpha1.Plugin {
724724 {
725- Name : "prometheus" ,
725+ Name : "argoproj-labs/ prometheus" ,
726726 Location : "https://github.com/argoproj-labs/sample-rollouts-metric-plugin/releases/download/v0.0.3/metric-plugin-linux-amd64" ,
727727 SHA256 : "4acc0e7a2c99bd8fe2d9b8ee6da08d531ee3a4373c55c77e3b5ee55c866fae69" ,
728728 },
@@ -752,18 +752,33 @@ func RunRolloutsTests(namespaceScopedParam bool) {
752752 cm .Data [controllers .MetricPluginConfigMapKey_PreviousInvalidKey ] = cm .Data [controllers .MetricPluginConfigMapKey ]
753753 })).To (Succeed ())
754754
755- // We should not need to manually trigger reconciliation here, as the ConfigMap resource is watcehd
755+ By ("Trigger re-reconcile of RolloutManager by updating an annotation" )
756+ Expect (k8s .UpdateWithoutConflict (ctx , & rolloutsManager , k8sClient , func (obj client.Object ) {
757+ annots := obj .GetAnnotations ()
758+ if annots == nil {
759+ annots = map [string ]string {}
760+ }
761+ annots ["trigger-reconcile" ] = "true"
762+ obj .SetAnnotations (annots )
763+ })).To (Succeed ())
756764
757765 By ("Verify the old invalid key is removed and the new key still has the correct data" )
758766 Eventually (func () bool {
759767 if err := k8sClient .Get (ctx , client .ObjectKeyFromObject (& configMap ), & configMap ); err != nil {
760768 GinkgoWriter .Println (err )
761769 return false
762770 }
771+
763772 _ , oldKeyExists := configMap .Data [controllers .MetricPluginConfigMapKey_PreviousInvalidKey ]
764- return ! oldKeyExists &&
773+ res := ! oldKeyExists &&
765774 strings .Contains (configMap .Data [controllers .MetricPluginConfigMapKey ], "prometheus" ) &&
766775 strings .Contains (configMap .Data [controllers .MetricPluginConfigMapKey ], rolloutsManager .Spec .Plugins .Metric [0 ].Location )
776+
777+ if ! res {
778+ GinkgoWriter .Println ("configMap:" , configMap .Data )
779+ }
780+
781+ return res
767782 }, "1m" , "1s" ).Should (BeTrue ())
768783 })
769784 })
0 commit comments