Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F85595730
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/test/pleroma/web/akkoma_api/metrics_controller_test.exs b/test/pleroma/web/akkoma_api/metrics_controller_test.exs
index e703fc36c..9482f1312 100644
--- a/test/pleroma/web/akkoma_api/metrics_controller_test.exs
+++ b/test/pleroma/web/akkoma_api/metrics_controller_test.exs
@@ -1,29 +1,33 @@
defmodule Pleroma.Web.AkkomaAPI.MetricsControllerTest do
use Pleroma.Web.ConnCase, async: true
describe "GET /api/v1/akkoma/metrics" do
test "should return metrics when the user has admin:metrics" do
%{conn: conn} = oauth_access(["admin:metrics"])
- resp = conn
- |> get("/api/v1/akkoma/metrics")
- |> text_response(200)
+
+ resp =
+ conn
+ |> get("/api/v1/akkoma/metrics")
+ |> text_response(200)
assert resp =~ "# HELP"
end
test "should not allow users that do not have the admin:metrics scope" do
%{conn: conn} = oauth_access(["read:metrics"])
+
conn
|> get("/api/v1/akkoma/metrics")
|> json_response(403)
end
test "should be disabled by export_prometheus_metrics" do
clear_config([:instance, :export_prometheus_metrics], false)
%{conn: conn} = oauth_access(["admin:metrics"])
+
conn
|> get("/api/v1/akkoma/metrics")
|> response(404)
end
end
end
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jul 19, 10:53 PM (1 d, 10 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1695388
Default Alt Text
(1 KB)
Attached To
Mode
rPUBE pleroma-upstream
Attached
Detach File
Event Timeline
Log In to Comment