about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs18
1 files changed, 2 insertions, 16 deletions
diff --git a/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs b/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs

index 401223c..6878b44 100644 --- a/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs +++ b/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
@@ -3,9 +3,7 @@ using LibMatrix.Homeservers; using LibMatrix.Responses; using LibMatrix.Services; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Logging.Abstractions; using Xunit.Abstractions; -using Xunit.Sdk; namespace LibMatrix.Tests.Abstractions; @@ -78,19 +76,7 @@ public class HomeserverAbstraction(HomeserverProviderService _hsProvider, Config var username = _config.TestUsername; var password = _config.TestPassword; - - LoginResponse reg; - try { - reg = await rhs.LoginAsync(username, password); - } - catch (MatrixException e) { - if (e.ErrorCode == "M_FORBIDDEN") { - await rhs.RegisterAsync(Guid.NewGuid().ToString(), Guid.NewGuid().ToString(), "Unit tests!"); - reg = await rhs.RegisterAsync(username, password, "Unit tests!"); - } - else throw new Exception("Failed to log in", e); - } - - return (username, password, reg.AccessToken); + var reg = await rhs.RegisterAsync(username, password, "Unit tests!"); + return ("", "", ""); } } \ No newline at end of file