From 29193f12f3f61cf20a11a972a61500b11e82bae6 Mon Sep 17 00:00:00 2001 From: Till <2353100+S7evinK@users.noreply.github.com> Date: Mon, 3 Apr 2023 19:20:41 +0200 Subject: [PATCH] Use `v1` and `v3` endpoints for `/thirdparty` tests (#1310) --- lib/SyTest/ApplicationService.pm | 2 +- tests/60app-services/03passive.pl | 4 ++-- tests/60app-services/05lookup3pe.pl | 10 +++++----- 3 files changed, 8 insertions(+), 8 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 ) = @_; 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",