1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 03:52:06 +01:00

[sinttest] Fix IBR-based account registration

When performing IBR-based account registration, we do not need to
login nor are the admin credentials typically available.

Suggested-by: Guus der Kinderen <guus@goodbytes.nl>
This commit is contained in:
Florian Schmaus 2023-11-26 13:50:00 +01:00
parent 9055878748
commit 915626123d

View file

@ -187,14 +187,14 @@ public class XmppConnectionManager {
case inBandRegistration: case inBandRegistration:
accountRegistrationConnection = defaultConnectionDescriptor.construct(sinttestConfiguration); accountRegistrationConnection = defaultConnectionDescriptor.construct(sinttestConfiguration);
accountRegistrationConnection.connect(); accountRegistrationConnection.connect();
accountRegistrationConnection.login(sinttestConfiguration.adminAccountUsername,
sinttestConfiguration.adminAccountPassword);
if (sinttestConfiguration.accountRegistration == AccountRegistration.inBandRegistration) { if (sinttestConfiguration.accountRegistration == AccountRegistration.inBandRegistration) {
adminManager = null; adminManager = null;
accountManager = AccountManager.getInstance(accountRegistrationConnection); accountManager = AccountManager.getInstance(accountRegistrationConnection);
} else { } else {
accountRegistrationConnection.login(sinttestConfiguration.adminAccountUsername,
sinttestConfiguration.adminAccountPassword);
adminManager = ServiceAdministrationManager.getInstanceFor(accountRegistrationConnection); adminManager = ServiceAdministrationManager.getInstanceFor(accountRegistrationConnection);
accountManager = null; accountManager = null;
} }