Merge "Remove logic that adds owner and uploader because of robot comments"

This commit is contained in:
Gal Paikin
2020-10-02 11:32:38 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 38 deletions

View File

@@ -1278,25 +1278,6 @@ public class AttentionSetIT extends AbstractDaemonTest {
assertThat(attentionSet).hasReasonThat().isEqualTo("A robot voted negatively on a label");
}
@Test
public void robotCommentAddsOwnerOnNewChanges() throws Exception {
TestAccount robot =
accountCreator.create("robot2", "robot2@example.com", "Ro Bot", "Ro", "Service Users");
PushOneCommit.Result r = createChange();
requestScopeOperations.setApiUser(robot.id());
ReviewInput reviewInput = new ReviewInput();
ReviewInput.RobotCommentInput robotCommentInput =
TestCommentHelper.createRobotCommentInputWithMandatoryFields("a.txt");
reviewInput.robotComments = ImmutableMap.of("a.txt", ImmutableList.of(robotCommentInput));
change(r).current().review(reviewInput);
AttentionSetUpdate attentionSet =
Iterables.getOnlyElement(getAttentionSetUpdatesForUser(r, admin));
assertThat(attentionSet).hasAccountIdThat().isEqualTo(admin.id());
assertThat(attentionSet).hasOperationThat().isEqualTo(AttentionSetUpdate.Operation.ADD);
assertThat(attentionSet).hasReasonThat().isEqualTo("A robot comment was added");
}
@Test
public void robotCommentDoesNotAddOwnerOnClosedChanges() throws Exception {
TestAccount robot =