From 9d02a3ff5a76519a7cbf9455c68cb331a808a08c Mon Sep 17 00:00:00 2001 From: Yoofi Quansah Date: Fri, 2 Feb 2024 18:04:50 -0600 Subject: [PATCH] chore(clickhouse): fix broken test --- internal/server/analytics/clickhouse/client_test.go | 4 ++-- internal/server/middleware/grpc/middleware_test.go | 8 ++++---- ui/src/app/flags/analytics/Analytics.tsx | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/internal/server/analytics/clickhouse/client_test.go b/internal/server/analytics/clickhouse/client_test.go index 5b927db6c1..bd56caa889 100644 --- a/internal/server/analytics/clickhouse/client_test.go +++ b/internal/server/analytics/clickhouse/client_test.go @@ -17,8 +17,8 @@ func TestGetStepFromDuration(t *testing.T) { name: "1 hour duration", duration: time.Hour, want: &Step{ - intervalValue: 15, - intervalStep: "SECOND", + intervalValue: 1, + intervalStep: "MINUTE", }, }, { diff --git a/internal/server/middleware/grpc/middleware_test.go b/internal/server/middleware/grpc/middleware_test.go index b35714ee11..70fbdc0631 100644 --- a/internal/server/middleware/grpc/middleware_test.go +++ b/internal/server/middleware/grpc/middleware_test.go @@ -176,7 +176,7 @@ func TestEvaluationUnaryInterceptor_Noop(t *testing.T) { } ) - got, err := EvaluationUnaryInterceptor(context.Background(), req, info, handler) + got, err := EvaluationUnaryInterceptor(false)(context.Background(), req, info, handler) require.NoError(t, err) assert.NotNil(t, got) @@ -273,7 +273,7 @@ func TestEvaluationUnaryInterceptor_Evaluation(t *testing.T) { } ) - got, err := EvaluationUnaryInterceptor(context.Background(), test.req, info, handler) + got, err := EvaluationUnaryInterceptor(false)(context.Background(), test.req, info, handler) require.NoError(t, err) assert.NotNil(t, got) @@ -322,7 +322,7 @@ func TestEvaluationUnaryInterceptor_BatchEvaluation(t *testing.T) { } ) - got, err := EvaluationUnaryInterceptor(context.Background(), req, info, handler) + got, err := EvaluationUnaryInterceptor(false)(context.Background(), req, info, handler) require.NoError(t, err) assert.NotNil(t, got) @@ -345,7 +345,7 @@ func TestEvaluationUnaryInterceptor_BatchEvaluation(t *testing.T) { }, } - got, err = EvaluationUnaryInterceptor(context.Background(), req, info, handler) + got, err = EvaluationUnaryInterceptor(false)(context.Background(), req, info, handler) require.NoError(t, err) assert.NotNil(t, got) diff --git a/ui/src/app/flags/analytics/Analytics.tsx b/ui/src/app/flags/analytics/Analytics.tsx index 5de948319f..0ec1dc5284 100644 --- a/ui/src/app/flags/analytics/Analytics.tsx +++ b/ui/src/app/flags/analytics/Analytics.tsx @@ -3,7 +3,7 @@ import { useSelector } from 'react-redux'; import { useOutletContext } from 'react-router-dom'; import Combobox from '~/components/forms/Combobox'; import 'chartjs-adapter-date-fns'; -import { add, addMinutes, format, parseISO } from 'date-fns'; +import { addMinutes, format, parseISO } from 'date-fns'; import { selectCurrentNamespace } from '~/app/namespaces/namespacesSlice'; import { IFlag } from '~/types/Flag'; import { BarGraph } from '~/components/graphs';