@@ -264,7 +264,7 @@ fn is_valid_for_webhook(
264264 let id = webhook. identity . id . to_string ( ) ;
265265 move |when| {
266266 when. path ( path)
267- . header ( "x-oxide-webhook -id" , id)
267+ . header ( "x-oxide-receiver -id" , id)
268268 . header_exists ( "x-oxide-delivery-id" )
269269 . header_exists ( "x-oxide-signature" )
270270 . header ( "content-type" , "application/json" )
@@ -514,8 +514,8 @@ async fn test_event_delivery(cptestctx: &ControlPlaneTestContext) {
514514 } )
515515 . to_string ( ) ;
516516 when. method ( POST )
517- . header ( "x-oxide-event -class" , "test.foo" )
518- . header ( "x-oxide-event -id" , id. to_string ( ) )
517+ . header ( "x-oxide-alert -class" , "test.foo" )
518+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
519519 . and ( is_valid_for_webhook ( & webhook) )
520520 . is_true ( signature_verifies (
521521 webhook. config . secrets [ 0 ] . id ,
@@ -627,8 +627,8 @@ async fn test_multiple_secrets(cptestctx: &ControlPlaneTestContext) {
627627 let mock = server
628628 . mock_async ( |when, then| {
629629 when. method ( POST )
630- . header ( "x-oxide-event -class" , "test.foo" )
631- . header ( "x-oxide-event -id" , id. to_string ( ) )
630+ . header ( "x-oxide-alert -class" , "test.foo" )
631+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
632632 . and ( is_valid_for_webhook ( & webhook) )
633633 // There should be a signature header present for all three
634634 // secrets, and they should all verify the contents of the
@@ -716,8 +716,8 @@ async fn test_multiple_receivers(cptestctx: &ControlPlaneTestContext) {
716716 srv_bar
717717 . mock_async ( move |when, then| {
718718 when. method ( POST )
719- . header ( "x-oxide-event -class" , "test.foo.bar" )
720- . header ( "x-oxide-event -id" , bar_alert_id. to_string ( ) )
719+ . header ( "x-oxide-alert -class" , "test.foo.bar" )
720+ . header ( "x-oxide-alert -id" , bar_alert_id. to_string ( ) )
721721 . and ( is_valid_for_webhook ( & webhook) )
722722 . is_true ( signature_verifies (
723723 webhook. config . secrets [ 0 ] . id ,
@@ -757,8 +757,8 @@ async fn test_multiple_receivers(cptestctx: &ControlPlaneTestContext) {
757757 srv_baz
758758 . mock_async ( move |when, then| {
759759 when. method ( POST )
760- . header ( "x-oxide-event -class" , "test.foo.baz" )
761- . header ( "x-oxide-event -id" , baz_alert_id. to_string ( ) )
760+ . header ( "x-oxide-alert -class" , "test.foo.baz" )
761+ . header ( "x-oxide-alert -id" , baz_alert_id. to_string ( ) )
762762 . and ( is_valid_for_webhook ( & webhook) )
763763 . is_true ( signature_verifies (
764764 webhook. config . secrets [ 0 ] . id ,
@@ -800,10 +800,10 @@ async fn test_multiple_receivers(cptestctx: &ControlPlaneTestContext) {
800800 . mock_async ( move |when, then| {
801801 when. method ( POST )
802802 . header_matches (
803- "x-oxide-event -class" ,
803+ "x-oxide-alert -class" ,
804804 "test\\ .foo\\ .ba[rz]" ,
805805 )
806- . header_exists ( "x-oxide-event -id" )
806+ . header_exists ( "x-oxide-alert -id" )
807807 . and ( is_valid_for_webhook ( & webhook) )
808808 . is_true ( signature_verifies (
809809 webhook. config . secrets [ 0 ] . id ,
@@ -883,8 +883,8 @@ async fn test_retry_backoff(cptestctx: &ControlPlaneTestContext) {
883883 } )
884884 . to_string ( ) ;
885885 when. method ( POST )
886- . header ( "x-oxide-event -class" , "test.foo" )
887- . header ( "x-oxide-event -id" , id. to_string ( ) )
886+ . header ( "x-oxide-alert -class" , "test.foo" )
887+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
888888 . and ( is_valid_for_webhook ( & webhook) )
889889 . is_true ( signature_verifies (
890890 webhook. config . secrets [ 0 ] . id ,
@@ -962,8 +962,8 @@ async fn test_retry_backoff(cptestctx: &ControlPlaneTestContext) {
962962 } )
963963 . to_string ( ) ;
964964 when. method ( POST )
965- . header ( "x-oxide-event -class" , "test.foo" )
966- . header ( "x-oxide-event -id" , id. to_string ( ) )
965+ . header ( "x-oxide-alert -class" , "test.foo" )
966+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
967967 . and ( is_valid_for_webhook ( & webhook) )
968968 . is_true ( signature_verifies (
969969 webhook. config . secrets [ 0 ] . id ,
@@ -1032,8 +1032,8 @@ async fn test_retry_backoff(cptestctx: &ControlPlaneTestContext) {
10321032 } )
10331033 . to_string ( ) ;
10341034 when. method ( POST )
1035- . header ( "x-oxide-event -class" , "test.foo" )
1036- . header ( "x-oxide-event -id" , id. to_string ( ) )
1035+ . header ( "x-oxide-alert -class" , "test.foo" )
1036+ . header ( "x-oxide-alert -id" , id. to_string ( ) )
10371037 . and ( is_valid_for_webhook ( & webhook) )
10381038 . is_true ( signature_verifies (
10391039 webhook. config . secrets [ 0 ] . id ,
@@ -1116,7 +1116,7 @@ async fn test_probe(cptestctx: &ControlPlaneTestContext) {
11161116 server
11171117 . mock_async ( move |when, then| {
11181118 when. method ( POST )
1119- . header ( "x-oxide-event -class" , "probe" )
1119+ . header ( "x-oxide-alert -class" , "probe" )
11201120 . and ( is_valid_for_webhook ( & webhook) )
11211121 . is_true ( signature_verifies (
11221122 webhook. config . secrets [ 0 ] . id ,
@@ -1170,7 +1170,7 @@ async fn test_probe(cptestctx: &ControlPlaneTestContext) {
11701170 server
11711171 . mock_async ( move |when, then| {
11721172 when. method ( POST )
1173- . header ( "x-oxide-event -class" , "probe" )
1173+ . header ( "x-oxide-alert -class" , "probe" )
11741174 . and ( is_valid_for_webhook ( & webhook) )
11751175 . is_true ( signature_verifies (
11761176 webhook. config . secrets [ 0 ] . id ,
@@ -1219,7 +1219,7 @@ async fn test_probe(cptestctx: &ControlPlaneTestContext) {
12191219 server
12201220 . mock_async ( move |when, then| {
12211221 when. method ( POST )
1222- . header ( "x-oxide-event -class" , "probe" )
1222+ . header ( "x-oxide-alert -class" , "probe" )
12231223 . and ( is_valid_for_webhook ( & webhook) )
12241224 . is_true ( signature_verifies (
12251225 webhook. config . secrets [ 0 ] . id ,
@@ -1289,10 +1289,10 @@ async fn test_probe_resends_failed_deliveries(
12891289 server
12901290 . mock_async ( move |when, then| {
12911291 when. method ( POST )
1292- . header ( "x-oxide-event -class" , "test.foo" )
1292+ . header ( "x-oxide-alert -class" , "test.foo" )
12931293 // either event
12941294 . header_matches (
1295- "x-oxide-event -id" ,
1295+ "x-oxide-alert -id" ,
12961296 format ! ( "({event1_id})|({event2_id})" ) ,
12971297 )
12981298 . and ( is_valid_for_webhook ( & webhook) )
@@ -1363,7 +1363,7 @@ async fn test_probe_resends_failed_deliveries(
13631363 } )
13641364 . to_string ( ) ;
13651365 when. method ( POST )
1366- . header ( "x-oxide-event -class" , "probe" )
1366+ . header ( "x-oxide-alert -class" , "probe" )
13671367 . and ( is_valid_for_webhook ( & webhook) )
13681368 . is_true ( signature_verifies (
13691369 webhook. config . secrets [ 0 ] . id ,
@@ -1381,10 +1381,10 @@ async fn test_probe_resends_failed_deliveries(
13811381 server
13821382 . mock_async ( move |when, then| {
13831383 when. method ( POST )
1384- . header ( "x-oxide-event -class" , "test.foo" )
1384+ . header ( "x-oxide-alert -class" , "test.foo" )
13851385 // either event
13861386 . header_matches (
1387- "x-oxide-event -id" ,
1387+ "x-oxide-alert -id" ,
13881388 format ! ( "({event1_id})|({event2_id})" ) ,
13891389 )
13901390 . and ( is_valid_for_webhook ( & webhook) )
@@ -1453,8 +1453,8 @@ async fn test_api_resends_failed_deliveries(
14531453 server
14541454 . mock_async ( move |when, then| {
14551455 when. method ( POST )
1456- . header ( "x-oxide-event -class" , "test.foo" )
1457- . header ( "x-oxide-event -id" , event1_id. to_string ( ) )
1456+ . header ( "x-oxide-alert -class" , "test.foo" )
1457+ . header ( "x-oxide-alert -id" , event1_id. to_string ( ) )
14581458 . and ( is_valid_for_webhook ( & webhook) )
14591459 . is_true ( signature_verifies (
14601460 webhook. config . secrets [ 0 ] . id ,
@@ -1513,8 +1513,8 @@ async fn test_api_resends_failed_deliveries(
15131513 server
15141514 . mock_async ( move |when, then| {
15151515 when. method ( POST )
1516- . header ( "x-oxide-event -class" , "test.foo" )
1517- . header ( "x-oxide-event -id" , event1_id. to_string ( ) )
1516+ . header ( "x-oxide-alert -class" , "test.foo" )
1517+ . header ( "x-oxide-alert -id" , event1_id. to_string ( ) )
15181518 . and ( is_valid_for_webhook ( & webhook) )
15191519 . is_true ( signature_verifies (
15201520 webhook. config . secrets [ 0 ] . id ,
@@ -1592,8 +1592,8 @@ async fn subscription_add_test(
15921592 } )
15931593 . to_string ( ) ;
15941594 when. method ( POST )
1595- . header ( "x-oxide-event -class" , "test.foo.bar" )
1596- . header ( "x-oxide-event -id" , id2. to_string ( ) )
1595+ . header ( "x-oxide-alert -class" , "test.foo.bar" )
1596+ . header ( "x-oxide-alert -id" , id2. to_string ( ) )
15971597 . and ( is_valid_for_webhook ( & webhook) )
15981598 . is_true ( signature_verifies (
15991599 webhook. config . secrets [ 0 ] . id ,
@@ -1724,8 +1724,8 @@ async fn subscription_remove_test(
17241724 } )
17251725 . to_string ( ) ;
17261726 when. method ( POST )
1727- . header ( "x-oxide-event -class" , "test.foo.bar" )
1728- . header ( "x-oxide-event -id" , id1. to_string ( ) )
1727+ . header ( "x-oxide-alert -class" , "test.foo.bar" )
1728+ . header ( "x-oxide-alert -id" , id1. to_string ( ) )
17291729 . and ( is_valid_for_webhook ( & webhook) )
17301730 . is_true ( signature_verifies (
17311731 webhook. config . secrets [ 0 ] . id ,
@@ -1805,8 +1805,8 @@ async fn subscription_remove_test(
18051805 } )
18061806 . to_string ( ) ;
18071807 when. method ( POST )
1808- . header ( "x-oxide-event -class" , "test.foo" )
1809- . header ( "x-oxide-event -id" , id3. to_string ( ) )
1808+ . header ( "x-oxide-alert -class" , "test.foo" )
1809+ . header ( "x-oxide-alert -id" , id3. to_string ( ) )
18101810 . and ( is_valid_for_webhook ( & webhook) )
18111811 . is_true ( signature_verifies (
18121812 webhook. config . secrets [ 0 ] . id ,
0 commit comments