about summary refs log tree commit diff
path: root/Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2024-09-17 14:08:04 +0200
committerRory& <root@rory.gay>2024-09-17 14:08:04 +0200
commit80d0a3cdf6889ee360dad6a2c270fd42249bbf83 (patch)
tree81700b2c4d937d40cca554b136a65d7634fecee0 /Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs
parentArcanelibs changes (diff)
parentFix unit tests, add authenticated media (diff)
downloadLibMatrix-80d0a3cdf6889ee360dad6a2c270fd42249bbf83.tar.xz
Merge branch 'dev/authenticated-media' HEAD master
Diffstat (limited to 'Tests/LibMatrix.Tests/Abstractions/HomeserverAbstraction.cs')
-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