From 943b3ea8e181911e8c4a3f49d8a42284d96473c6 Mon Sep 17 00:00:00 2001 From: Till Faelligen <2353100+S7evinK@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:21:18 +0200 Subject: [PATCH 1/2] Use v1 and v3 endpoints --- tests/60app-services/05lookup3pe.pl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/60app-services/05lookup3pe.pl b/tests/60app-services/05lookup3pe.pl index e29ace7af..79a29a86a 100644 --- a/tests/60app-services/05lookup3pe.pl +++ b/tests/60app-services/05lookup3pe.pl @@ -1,6 +1,6 @@ use List::UtilsBy qw( sort_by ); -use constant AS_PREFIX => "/_matrix/app/unstable"; +use constant AS_PREFIX => "/_matrix/app/v1"; sub stub_empty_result { @@ -59,7 +59,7 @@ sub stub_empty_result do_request_json_for( $user, method => "GET", - uri => "/unstable/thirdparty/protocols" + uri => "/v3/thirdparty/protocols" )->then( sub { my ( $body ) = @_; @@ -107,7 +107,7 @@ sub stub_empty_result do_request_json_for( $user, method => "GET", - uri => "/unstable/thirdparty/protocol/ymca" + uri => "/v3/thirdparty/protocol/ymca" )->then( sub { my ( $body ) = @_; @@ -172,7 +172,7 @@ sub stub_empty_result do_request_json_for( $user, method => "GET", - uri => "/unstable/thirdparty/user/ymca", + uri => "/v3/thirdparty/user/ymca", params => { field1 => "ONE", @@ -237,7 +237,7 @@ sub stub_empty_result do_request_json_for( $user, method => "GET", - uri => "/unstable/thirdparty/location/ymca", + uri => "/v3/thirdparty/location/ymca", params => { field3 => "THREE", From c313242e7d16c3bf375f4d26c6eab3e77421e04e Mon Sep 17 00:00:00 2001 From: Patrick Cloke Date: Tue, 28 Mar 2023 11:40:14 -0400 Subject: [PATCH 2/2] Update other paths to modern path-names. --- lib/SyTest/ApplicationService.pm | 2 +- tests/60app-services/03passive.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/SyTest/ApplicationService.pm b/lib/SyTest/ApplicationService.pm index dc17142c2..9b5e70c65 100644 --- a/lib/SyTest/ApplicationService.pm +++ b/lib/SyTest/ApplicationService.pm @@ -42,7 +42,7 @@ sub new my %futures_by_type; my $f = repeat { - $await_http->( qr{^\Q$path\E/transactions/\d+$}, sub { 1 }, + $await_http->( qr{^\Q$path\E/_matrix/app/v1/transactions/\d+$}, sub { 1 }, timeout => 0, )->then( sub { my ( $request ) = @_; diff --git a/tests/60app-services/03passive.pl b/tests/60app-services/03passive.pl index 35436fedf..15c3f6752 100644 --- a/tests/60app-services/03passive.pl +++ b/tests/60app-services/03passive.pl @@ -13,7 +13,7 @@ my $localpart = "astest-03passive-1"; my $user_id = "\@$localpart:$server_name"; - require_stub $appserv->await_http_request( "/users/$user_id", sub { 1 } ) + require_stub $appserv->await_http_request( "/_matrix/app/v1/users/$user_id", sub { 1 } ) ->then( sub { my ( $request ) = @_; @@ -52,7 +52,7 @@ do => sub { my ( $as_user, $appserv, $local_user, $room_id, $room_alias ) = @_; - require_stub $appserv->await_http_request( "/rooms/$room_alias", sub { 1 } ) + require_stub $appserv->await_http_request( "/_matrix/app/v1/rooms/$room_alias", sub { 1 } ) ->then( sub { my ( $request ) = @_;