atharvalade commented on code in PR #2710:
URL: https://github.com/apache/iggy/pull/2710#discussion_r2790687154
##########
foreign/csharp/Iggy_SDK.Tests.Integration/UsersTests.cs:
##########
@@ -156,31 +173,47 @@ await Should.NotThrowAsync(Fixture.Clients[protocol]
}
[Test]
-
[DependsOn(nameof(UpdatePermissions_Should_UpdatePermissions_Successfully))]
[MethodDataSource<IggyServerFixture>(nameof(IggyServerFixture.ProtocolData))]
public async Task
ChangePassword_Should_ChangePassword_Successfully(Protocol protocol)
{
- await Should.NotThrowAsync(Fixture.Clients[protocol]
-
.ChangePassword(Identifier.String(Username.GetWithProtocol(protocol)),
"test_password_1", "user2"));
+ var client = protocol == Protocol.Tcp
+ ? await Fixture.CreateTcpClient()
+ : await Fixture.CreateHttpClient();
+
+ var username = $"chpw-{Guid.NewGuid():N}"[..20];
+ await client.CreateUser(username, "old_password", UserStatus.Active);
+
+ await
Should.NotThrowAsync(client.ChangePassword(Identifier.String(username),
"old_password", "new_password"));
Review Comment:
Done. `UsersTests.ChangePassword` now creates a new client, logs in with
"`new_password`", and asserts the response is valid
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]