mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 09:02:41 +01:00
Add failing test for relog issue
This commit is contained in:
@@ -1342,7 +1342,20 @@ namespace Tgstation.Server.Tests.Live
|
||||
{
|
||||
Api.Models.Instance instance;
|
||||
long initialStaged, initialActive, initialSessionId;
|
||||
|
||||
await using var firstAdminClient = await CreateAdminClient(server.ApiUrl, cancellationToken);
|
||||
await using (var tokenOnlyClient = clientFactory.CreateFromToken(server.RootUrl, firstAdminClient.Token))
|
||||
{
|
||||
// regression test for password change issue
|
||||
var currentUser = await tokenOnlyClient.Users.Read(cancellationToken);
|
||||
var updatedUser = await tokenOnlyClient.Users.Update(new UserUpdateRequest
|
||||
{
|
||||
Id = currentUser.Id,
|
||||
Password = DefaultCredentials.DefaultAdminUserPassword,
|
||||
}, cancellationToken);
|
||||
|
||||
await ApiAssert.ThrowsException<UnauthorizedException, UserResponse>(() => tokenOnlyClient.Users.Read(cancellationToken), null);
|
||||
}
|
||||
|
||||
async ValueTask<IServerClient> CreateUserWithNoInstancePerms()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user