@@ -252,22 +252,20 @@ func TestLoggingMetrics_Monitoring(t *testing.T) {
252252func installPrometheusOperator (c common.Cluster ) error {
253253 manager := helm .New (c .KubeConfigFilePath ())
254254
255- err := manager .RunRepo (helm .WithArgs ("add" , "prometheus-community" , "https://prometheus-community.github.io/helm-charts" ))
256- if err != nil {
257- return fmt .Errorf ("failed to add prometheus-community repo: %w" , err )
255+ if err := manager .RunRepo (helm .WithArgs ("add" , "prometheus-community" , "https://prometheus-community.github.io/helm-charts" )); err != nil {
256+ return fmt .Errorf ("failed to add prometheus-community repo: %v" , err )
258257 }
259258
260- err = manager .RunInstall (
259+ if err : = manager .RunInstall (
261260 helm .WithName ("prometheus" ),
262261 helm .WithChart ("prometheus-community/kube-prometheus-stack" ),
263262 helm .WithArgs ("--create-namespace" ),
264263 helm .WithNamespace ("monitoring" ),
265264 helm .WithArgs ("--set" , "prometheus.prometheusSpec.serviceMonitorSelectorNilUsesHelmValues=false" ),
266265 helm .WithArgs ("--set" , "prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false" ),
267266 helm .WithWait (),
268- )
269- if err != nil {
270- return fmt .Errorf ("failed to install prometheus-operator: %w" , err )
267+ ); err != nil {
268+ return fmt .Errorf ("failed to install prometheus: %v" , err )
271269 }
272270
273271 return nil
0 commit comments