use of com.google.gerrit.acceptance.GerritConfig in project gerrit by GerritCodeReview.
the class ListMailFilterIT method listFilterOff.
@Test
@GerritConfig(name = "receiveemail.filter.mode", value = "OFF")
public void listFilterOff() throws Exception {
ChangeInfo changeInfo = createChangeAndReplyByEmail();
// Check that the comments from the email have been persisted
Collection<ChangeMessageInfo> messages = gApi.changes().id(changeInfo.id).get().messages;
assertThat(messages).hasSize(3);
}
use of com.google.gerrit.acceptance.GerritConfig in project gerrit by GerritCodeReview.
the class ListMailFilterIT method listFilterWhitelistFiltersNotListedUser.
@Test
@GerritConfig(name = "receiveemail.filter.mode", value = "WHITELIST")
@GerritConfig(name = "receiveemail.filter.patterns", values = { ".+@gerritcodereview\\.com", "a@b\\.com" })
public void listFilterWhitelistFiltersNotListedUser() throws Exception {
ChangeInfo changeInfo = createChangeAndReplyByEmail();
// Check that the comments from the email have NOT been persisted
Collection<ChangeMessageInfo> messages = gApi.changes().id(changeInfo.id).get().messages;
assertThat(messages).hasSize(2);
}
use of com.google.gerrit.acceptance.GerritConfig in project gerrit by GerritCodeReview.
the class ListMailFilterIT method listFilterWhitelistDoesNotFilterListedUser.
@Test
@GerritConfig(name = "receiveemail.filter.mode", value = "WHITELIST")
@GerritConfig(name = "receiveemail.filter.patterns", values = { ".+ser@example\\.com", "a@b\\.com" })
public void listFilterWhitelistDoesNotFilterListedUser() throws Exception {
ChangeInfo changeInfo = createChangeAndReplyByEmail();
// Check that the comments from the email have been persisted
Collection<ChangeMessageInfo> messages = gApi.changes().id(changeInfo.id).get().messages;
assertThat(messages).hasSize(3);
}
use of com.google.gerrit.acceptance.GerritConfig in project gerrit by GerritCodeReview.
the class ListMailFilterIT method listFilterBlacklistDoesNotFilterNotListedUser.
@Test
@GerritConfig(name = "receiveemail.filter.mode", value = "BLACKLIST")
@GerritConfig(name = "receiveemail.filter.patterns", values = { ".+@gerritcodereview\\.com", "a@b\\.com" })
public void listFilterBlacklistDoesNotFilterNotListedUser() throws Exception {
ChangeInfo changeInfo = createChangeAndReplyByEmail();
// Check that the comments from the email have been persisted
Collection<ChangeMessageInfo> messages = gApi.changes().id(changeInfo.id).get().messages;
assertThat(messages).hasSize(3);
}
Aggregations