Skip to content
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 @@ -85,6 +85,8 @@ INSERT INTO storage (id, available) VALUES (11, true);

INSERT INTO user_account (id, email, password, name, active) VALUES (1, 'admin', '$2a$10$Cmwx2Xr/PVpkibiiDz0s7eaVGZHPUvAu5ivdVC5BJgSYbp3c06FY6', 'Admin', true);
INSERT INTO user_account (id, email, password, name, active) VALUES (4, 'ivan.petrov@yandex.ru', '$2a$10$LfLg6vp4.wyowWP9ysg3F.yQ/udNKfRhGlHJ298xGCtBLC2dDX.OC', 'Ivan Petrov', true);
INSERT INTO user_account (id, email, password, name, active) VALUES (5, 'user2@yandex.ru', '$2a$12$vMKCOwlcHtiPqQJaS6TqR.YFZyjcXTz1BVQk5pPlW/oIidNRIrqfm', 'Yuri Dolgoruki', true);


INSERT INTO user_role (user_id, role_id) VALUES (1, 0);

Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ public SutInfoDto.OutputFormat getPreferredOutputFormat() {
public List<AuthenticationDto> getInfoForAuthentication() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update ExternalEvoMasterController as well

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onurd86 btw, I assume you then run EvoMaster on this update settings, and verified there was no message saying 401 with this new user, isn't it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Andrea,

Thanks for mentioning that. I tried to run EvoMaster again after adding the new user. I do not get any 401 after adding the new user. Adding a new user to market was very easy.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have updated External Controller as well.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was one of the successful tests generated by EvoMaster after adding user2:

@Test @Timeout(60)
   public void test_1() throws Exception {
       
       given().accept("*/*")
               .header("Authorization", "Basic dXNlcjJAeWFuZGV4LnJ1Onl1cmlkb2xnb3J1a2k=") // user2
               .header("x-EMextraHeader123", "")
               .get(baseUrlOfSut + "/customer/orders?name=ATX")
               .then()
               .statusCode(200)
               .assertThat()
               .contentType("application/json")
               .body("size()", equalTo(0));
   }

return Arrays.asList(
AuthUtils.getForBasic("admin","admin","password"),
AuthUtils.getForBasic("user", "ivan.petrov@yandex.ru", "petrov")
AuthUtils.getForBasic("user", "ivan.petrov@yandex.ru", "petrov"),
AuthUtils.getForBasic("user2", "user2@yandex.ru", "yuridolgoruki")
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,8 @@ public SutInfoDto.OutputFormat getPreferredOutputFormat() {
public List<AuthenticationDto> getInfoForAuthentication() {
return Arrays.asList(
AuthUtils.getForBasic("admin","admin","password"),
AuthUtils.getForBasic("user", "ivan.petrov@yandex.ru", "petrov")
AuthUtils.getForBasic("user", "ivan.petrov@yandex.ru", "petrov"),
AuthUtils.getForBasic("user2", "user2@yandex.ru", "yuridolgoruki")
);
}

Expand Down