Skip to content

Commit

Permalink
fix: add //nolint
Browse files Browse the repository at this point in the history
Signed-off-by: Mario Fernandez <mariofer@redhat.com>
  • Loading branch information
marioferh committed Aug 8, 2023
1 parent 10504d3 commit 5e1679d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/e2e/framework/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func (f *Framework) AssertStatefulsetReady(name, namespace string, fns ...Option
}
return func(t *testing.T) {
key := types.NamespacedName{Name: name, Namespace: namespace}
if err := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, option.WaitTimeout, true, func(ctx context.Context) (bool, error) {
//nolint
if err := wait.Poll(5*time.Second, option.WaitTimeout, func() (bool, error) {
pod := &appsv1.StatefulSet{}
err := f.K8sClient.Get(context.Background(), key, pod)
return err == nil && pod.Status.ReadyReplicas == *pod.Spec.Replicas, nil
Expand Down
6 changes: 4 additions & 2 deletions test/e2e/monitoring_stack_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,17 @@ func namespaceSelectorTest(t *testing.T) {

stopChan := make(chan struct{})
defer close(stopChan)
if pollErr := wait.PollUntilContextTimeout(context.Background(), 15*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) {
//nolint
if pollErr := wait.Poll(15*time.Second, 5*time.Minute, func() (bool, error) {
err := f.StartServicePortForward(ms.Name+"-prometheus", e2eTestNamespace, "9090", stopChan)
return err == nil, nil
}); pollErr != nil {
t.Fatal(pollErr)
}

promClient := framework.NewPrometheusClient("http://localhost:9090")
if pollErr := wait.PollUntilContextTimeout(context.Background(), 5*time.Second, 5*time.Minute, true, func(ctx context.Context) (bool, error) {
//nolint
if pollErr := wait.Poll(5*time.Second, 5*time.Minute, func() (bool, error) {
query := `version{pod="prometheus-example-app",namespace=~"test-ns-.*"}`
result, err := promClient.Query(query)
if err != nil {
Expand Down

0 comments on commit 5e1679d

Please sign in to comment.