Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Litarnus committed Feb 13, 2025
1 parent ae7e917 commit eedc6fd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion relay-server/src/endpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn routes(config: &Config) -> Router<ServiceState>{
let internal_routes = Router::new()
.route("/api/relay/healthcheck/{kind}/", get(health_check::handle))
.route("/api/relay/events/{event_id}/", get(events::handle))
.route("/api/relay/keda", get(keda::handle))
.route("/api/relay/keda/", get(keda::handle))
// Fallback route, but with a name, and just on `/api/relay/*`.
.route("/api/relay/{*not_found}", any(statics::not_found));

Expand Down
10 changes: 10 additions & 0 deletions tests/integration/test_keda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
"""
Tests the keda endpoint.
"""


def test_basic_keda(mini_sentry, relay):
relay = relay(mini_sentry)
response = relay.get("/api/relay/keda/")
assert response.status_code == 200
assert "up 1" in response.text

0 comments on commit eedc6fd

Please sign in to comment.