Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintenance: Add getAllTeamsSUFromRegisterUser, getAllTeamsSUOnly, ge… #2530

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.Random;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -267,18 +266,6 @@ private int getTenantId(String tenantName) {
.getKey();
}

String generateRandomWord(int len) {
String chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi" + "jklmnopqrstuvwxyz";
Random rnd = new Random();
StringBuilder sb = new StringBuilder(len);
for (int i = 0; i < len; i++) {
sb.append(chars.charAt(rnd.nextInt(chars.length())));
}
return sb.toString();
}

// public ResetPasswordInfo resetPassword(String userName,String token, String password) { }

public ResetPasswordInfo resetPasswordGenerateToken(String username) {
log.info("resetPasswordGenerateToken {}", username);
ResetPasswordInfo resetPasswordInfo = new ResetPasswordInfo();
Expand Down
8 changes: 8 additions & 0 deletions core/src/test/java/io/aiven/klaw/UtilMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import io.aiven.klaw.model.enums.RequestStatus;
import io.aiven.klaw.model.enums.SchemaType;
import io.aiven.klaw.model.requests.AclRequestsModel;
import io.aiven.klaw.model.requests.ChangePasswordRequestModel;
import io.aiven.klaw.model.requests.ConsumerOffsetResetRequestModel;
import io.aiven.klaw.model.requests.EnvModel;
import io.aiven.klaw.model.requests.ProfileModel;
Expand Down Expand Up @@ -625,6 +626,13 @@ public TeamModel getTeamModelMock() {
return team;
}

public ChangePasswordRequestModel getChangePwdRequestModelMock() {
ChangePasswordRequestModel changePwd = new ChangePasswordRequestModel();
changePwd.setPwd("newpassword");
changePwd.setRepeatPwd("newpassword");
return changePwd;
}

public List<TopicRequest> getTopicRequests() {
List<TopicRequest> allTopicReqs = new ArrayList<>();
TopicRequest topicRequest = new TopicRequest();
Expand Down
Loading