Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/app_test.go b/app_test.go
index 6da1e4fd..db4d9d67 100644
--- a/app_test.go
+++ b/app_test.go
@@ -9,11 +9,13 @@ import (
"testing"
"time"
+ "github.com/prometheus/client_golang/prometheus/testutil"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitlab-pages/internal/config"
"gitlab.com/gitlab-org/gitlab-pages/internal/request"
"gitlab.com/gitlab-org/gitlab-pages/internal/source/gitlab"
+ "gitlab.com/gitlab-org/gitlab-pages/metrics"
)
func Test_setRequestScheme(t *testing.T) {
@@ -142,4 +144,6 @@ func TestHandlePanicMiddleware(t *testing.T) {
res.Body.Close()
require.Equal(t, http.StatusInternalServerError, res.StatusCode)
+ counterCount := testutil.ToFloat64(metrics.PanicRecoveredCount)
+ require.Equal(t, float64(1), counterCount, "metric not updated")
}