From 5b9e7618c7f47ea98dc5b290f7623403799d0a88 Mon Sep 17 00:00:00 2001 From: Nikolai Vladimirov Date: Wed, 6 Mar 2024 06:39:12 +0200 Subject: [PATCH] chore: fix issues introduced from lint fixes --- internal/run/prom_push_gw_test.go | 2 +- internal/run/run_stage_test.go | 2 +- pkg/f1/f1_scenarios.go | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/internal/run/prom_push_gw_test.go b/internal/run/prom_push_gw_test.go index e7152e39..57bd241a 100644 --- a/internal/run/prom_push_gw_test.go +++ b/internal/run/prom_push_gw_test.go @@ -69,7 +69,7 @@ func (f *FakePrometheus) ServeHTTP(response http.ResponseWriter, request *http.R } if !ok { - f.metricFamilies.Store(metricFamily.GetName, metricFamily) + f.metricFamilies.Store(metricFamily.GetName(), metricFamily) } else { value, ok := mf.(*io_prometheus_client.MetricFamily) if !ok { diff --git a/internal/run/run_stage_test.go b/internal/run/run_stage_test.go index 077902e6..b4035f66 100644 --- a/internal/run/run_stage_test.go +++ b/internal/run/run_stage_test.go @@ -283,7 +283,7 @@ func (s *RunTestStage) a_test_scenario_that_fails_intermittently() *RunTestStage atomic.AddInt32(s.iterationTeardownCount, 1) }) count := atomic.AddInt32(&s.runCount, 1) - t.Require().Equal(0, count%2) + t.Require().Equal(int32(0), count%2) } }) return s diff --git a/pkg/f1/f1_scenarios.go b/pkg/f1/f1_scenarios.go index a54925e2..6a0aa0b5 100644 --- a/pkg/f1/f1_scenarios.go +++ b/pkg/f1/f1_scenarios.go @@ -68,7 +68,11 @@ func (f *F1) ExecuteWithArgs(args []string) error { rootCmd.SetArgs(args) err := rootCmd.Execute() writeProfiles(f.profiling) - return fmt.Errorf("command execute: %w", err) + if err != nil { + return fmt.Errorf("command execute: %w", err) + } + + return nil } // Returns the list of registered scenarios.