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.cs16
1 files changed, 2 insertions, 14 deletions
diff --git a/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs b/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
index 401223c..2819f80 100644
--- a/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
+++ b/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
@@ -78,19 +78,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