JAMES-2366 Fix grammar mistake in Cucumber specs
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/60299dfa Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/60299dfa Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/60299dfa Branch: refs/heads/master Commit: 60299dfaa90c7bbe9977ab1196706e25dad557d2 Parents: 3e97f94 Author: benwa <btell...@linagora.com> Authored: Thu Apr 5 09:37:28 2018 +0700 Committer: Antoine Duprat <adup...@linagora.com> Committed: Fri Apr 6 15:04:48 2018 +0200 ---------------------------------------------------------------------- .../james/rrt/lib/RewriteTablesStepdefs.java | 2 +- .../resources/cucumber/rewrite_tables.feature | 62 ++++++++++---------- 2 files changed, 32 insertions(+), 32 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/60299dfa/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java b/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java index 44423d5..c274bc1 100644 --- a/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java +++ b/server/data/data-library/src/test/java/org/apache/james/rrt/lib/RewriteTablesStepdefs.java @@ -126,7 +126,7 @@ public class RewriteTablesStepdefs { assertThat(rewriteTable.getMappings(user, Domain.of(domain))).isNullOrEmpty(); } - @Then("mappings for user \"([^\"]*)\" at domain \"([^\"]*)\" should contains only \"([^\"]*)\"") + @Then("mappings for user \"([^\"]*)\" at domain \"([^\"]*)\" should contain only \"([^\"]*)\"") public void assertMappingsForUser(String user, String domain, List<String> mappings) throws Throwable { assertThat(rewriteTable.getMappings(user, Domain.of(domain)).asStrings()).containsOnlyElementsOf(mappings); } http://git-wip-us.apache.org/repos/asf/james-project/blob/60299dfa/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature ---------------------------------------------------------------------- diff --git a/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature b/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature index 9e66fc0..03d4c55 100644 --- a/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature +++ b/server/data/data-library/src/test/resources/cucumber/rewrite_tables.feature @@ -8,12 +8,12 @@ Feature: Rewrite Tables tests Scenario: stored regexp mapping should be retrieved when one mapping matching Given store "(.*)@localhost" regexp mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "regex:(.*)@localhost" + Then mappings for user "test" at domain "localhost" should contain only "regex:(.*)@localhost" Scenario: stored regexp mapping should be retrieved when two mappings matching Given store "(.*)@localhost" regexp mapping for user "test" at domain "localhost" And store "(.+)@test" regexp mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "regex:(.*)@localhost, regex:(.+)@test" + Then mappings for user "test" at domain "localhost" should contain only "regex:(.*)@localhost, regex:(.+)@test" Scenario: stored regexp mapping should not be retrieved by another user Given store "(.*)@localhost" regexp mapping for user "test" at domain "localhost" @@ -24,7 +24,7 @@ Feature: Rewrite Tables tests Given store "(.*)@localhost" regexp mapping for user "test" at domain "localhost" And store "(.+)@test" regexp mapping for user "test" at domain "localhost" When user "test" at domain "localhost" removes a regexp mapping "(.+)@test" - Then mappings for user "test" at domain "localhost" should contains only "regex:(.*)@localhost" + Then mappings for user "test" at domain "localhost" should contain only "regex:(.*)@localhost" @readonly Scenario: storing an invalid regexp mapping should not work @@ -35,12 +35,12 @@ Feature: Rewrite Tables tests Scenario: stored address mapping should be retrieved when one mapping matching Given store "test@localhost2" address mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "test@localhost2" + Then mappings for user "test" at domain "localhost" should contain only "test@localhost2" Scenario: stored address mapping should be retrieved when two mappings matching Given store "test@localhost2" address mapping for user "test" at domain "localhost" And store "test@james" address mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "test@localhost2, test@james" + Then mappings for user "test" at domain "localhost" should contain only "test@localhost2, test@james" Scenario: stored address mapping should not be retrieved by another user Given store "test@localhost2" address mapping for user "test" at domain "localhost" @@ -51,7 +51,7 @@ Feature: Rewrite Tables tests Given store "test@localhost2" address mapping for user "test" at domain "localhost" And store "test@james" address mapping for user "test" at domain "localhost" When user "test" at domain "localhost" removes a address mapping "test@james" - Then mappings for user "test" at domain "localhost" should contains only "test@localhost2" + Then mappings for user "test" at domain "localhost" should contain only "test@localhost2" # Error mapping @@ -88,81 +88,81 @@ Feature: Rewrite Tables tests Scenario: stored address mapping as wildcard should be retrieved by one user when one mapping matching Given store "test@localhost" address mapping as wildcard for domain "localhost" - Then mappings for user "user" at domain "localhost" should contains only "test@localhost" + Then mappings for user "user" at domain "localhost" should contain only "test@localhost" Scenario: stored address mapping as wildcard should be retrieved by two users when one mapping matching Given store "test@localhost" address mapping as wildcard for domain "localhost" - Then mappings for user "user" at domain "localhost" should contains only "test@localhost" - And mappings for user "user2" at domain "localhost" should contains only "test@localhost" + Then mappings for user "user" at domain "localhost" should contain only "test@localhost" + And mappings for user "user2" at domain "localhost" should contain only "test@localhost" Scenario: direct mapping should override address mapping as wildcard Given recursive mapping is disable Given store "test@localhost" address mapping as wildcard for domain "localhost" And store "mine@localhost" address mapping for user "user" at domain "localhost" - Then mappings for user "user" at domain "localhost" should contains only "mine@localhost" + Then mappings for user "user" at domain "localhost" should contain only "mine@localhost" Scenario: direct mapping should override address mapping as wildcard (reverse insertion order) Given recursive mapping is disable Given store "mine@localhost" address mapping for user "user" at domain "localhost" And store "test@localhost" address mapping as wildcard for domain "localhost" - Then mappings for user "user" at domain "localhost" should contains only "mine@localhost" + Then mappings for user "user" at domain "localhost" should contain only "mine@localhost" Scenario: direct mapping should not override address mapping as wildcard when other user Given store "test@localhost" address mapping as wildcard for domain "localhost" And store "mine@localhost" address mapping for user "user" at domain "localhost" - Then mappings for user "user2" at domain "localhost" should contains only "test@localhost" + Then mappings for user "user2" at domain "localhost" should contain only "test@localhost" Scenario: direct mapping should be retrieved when removing address mapping as wildcard Given store "test@localhost" address mapping as wildcard for domain "localhost" And store "mine@localhost" address mapping for user "user" at domain "localhost" When wildcard address mapping "test@localhost" at domain "localhost" is removed - Then mappings for user "user" at domain "localhost" should contains only "mine@localhost" + Then mappings for user "user" at domain "localhost" should contain only "mine@localhost" Scenario: stored address mappings as wildcard should be retrieved when two address mappings as wildcard Given store "test@localhost" address mapping as wildcard for domain "localhost" And store "test2@localhost" address mapping as wildcard for domain "localhost" - Then mappings for user "user" at domain "localhost" should contains only "test@localhost, test2@localhost" + Then mappings for user "user" at domain "localhost" should contain only "test@localhost, test2@localhost" # Alias mapping Scenario: address mapping should be retrieved when searching with a domain alias Given store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "aliasdomain" should contains only "test@localhost" + Then mappings for user "test" at domain "aliasdomain" should contain only "test@localhost" Scenario: address mapping should be retrieved when searching with a domain alias Given store "test2@localhost" address mapping for user "test" at domain "localhost" And store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "aliasdomain" should contains only "test2@localhost" + Then mappings for user "test" at domain "aliasdomain" should contain only "test2@localhost" Scenario: address mapping should be retrieved when searching with a domain alias (reverse insertion order) Given store "aliasdomain" alias domain mapping for domain "localhost" And store "test2@localhost" address mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "aliasdomain" should contains only "test2@localhost" + Then mappings for user "test" at domain "aliasdomain" should contain only "test2@localhost" Scenario: address mapping should be retrieved when searching with the correct domain and exists an alias domain Given store "test2@localhost" address mapping for user "test" at domain "localhost" And store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "test2@localhost" + Then mappings for user "test" at domain "localhost" should contain only "test2@localhost" Scenario: wildcard address mapping should be retrieved when searching with a domain alias Given store "wildcard@localhost" address mapping as wildcard for domain "localhost" And store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "aliasdomain" should contains only "wildcard@localhost" + Then mappings for user "test" at domain "aliasdomain" should contain only "wildcard@localhost" Scenario: wildcard address mapping should be retrieved when searching with a domain and exists an alias domain Given store "wildcard@localhost" address mapping as wildcard for domain "localhost" And store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "wildcard@localhost" + Then mappings for user "test" at domain "localhost" should contain only "wildcard@localhost" Scenario: both wildcard address mapping and default user address should be retrieved when wildcard address mapping on alias domain Given store "wildcard@localhost" address mapping as wildcard for domain "aliasdomain" And store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "aliasdomain" should contains only "test@localhost, wildcard@localhost" + Then mappings for user "test" at domain "aliasdomain" should contain only "test@localhost, wildcard@localhost" Scenario: both wildcard address mapping and default user address should be retrieved when wildcard address mapping on alias domain (reverse insertion order) Given store "aliasdomain" alias domain mapping for domain "localhost" And store "wildcard@localhost" address mapping as wildcard for domain "aliasdomain" - Then mappings for user "test" at domain "aliasdomain" should contains only "test@localhost, wildcard@localhost" + Then mappings for user "test" at domain "aliasdomain" should contain only "test@localhost, wildcard@localhost" Scenario: asking for a removed domain alias should fail Given store "wildcard@localhost" address mapping as wildcard for domain "localhost" @@ -176,7 +176,7 @@ Feature: Rewrite Tables tests Given store "test2@localhost" address mapping for user "test" at domain "localhost" And store "(.*)@localhost" regexp mapping for user "test" at domain "localhost" And store "aliasdomain" alias domain mapping for domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "test2@localhost, regex:(.*)@localhost" + Then mappings for user "test" at domain "localhost" should contain only "test2@localhost, regex:(.*)@localhost" # Recursive mapping @@ -184,20 +184,20 @@ Feature: Rewrite Tables tests Given recursive mapping is disable And store "user2@domain2" address mapping for user "user1" at domain "domain1" And store "user3@domain3" address mapping for user "user2" at domain "domain2" - Then mappings for user "user1" at domain "domain1" should contains only "user2@domain2" + Then mappings for user "user1" at domain "domain1" should contain only "user2@domain2" Scenario: recursive mapping should work when two levels Given recursive mapping is enable And store "user2@domain2" address mapping for user "user1" at domain "domain1" And store "user3@domain3" address mapping for user "user2" at domain "domain2" - Then mappings for user "user1" at domain "domain1" should contains only "user3@domain3" + Then mappings for user "user1" at domain "domain1" should contain only "user3@domain3" Scenario: recursive mapping should work when three levels Given recursive mapping is enable And store "user2@domain2" address mapping for user "user1" at domain "domain1" And store "user3@domain3" address mapping for user "user2" at domain "domain2" And store "user4@domain4" address mapping for user "user3" at domain "domain3" - Then mappings for user "user1" at domain "domain1" should contains only "user4@domain4" + Then mappings for user "user1" at domain "domain1" should contain only "user4@domain4" Scenario: recursive mapping should throw exception when a loop exists Given recursive mapping is enable @@ -212,24 +212,24 @@ Feature: Rewrite Tables tests And store "user3@domain3" address mapping for user "user2" at domain "domain2" And store "user4@domain4" address mapping for user "user3" at domain "domain3" When user "user2" at domain "domain2" removes a address mapping "user3@domain3" - Then mappings for user "user1" at domain "domain1" should contains only "user2@domain2" + Then mappings for user "user1" at domain "domain1" should contain only "user2@domain2" Scenario: recursive mapping should work when three levels on alias domains Given store "domain2" alias domain mapping for domain "domain1" And store "domain3" alias domain mapping for domain "domain2" And store "domain4" alias domain mapping for domain "domain3" - Then mappings for user "test" at domain "domain4" should contains only "test@domain1" + Then mappings for user "test" at domain "domain4" should contain only "test@domain1" # Forward mapping Scenario: stored forward mapping should be retrieved when one mapping is matching Given store "test@localhost2" forward mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "forward:test@localhost2" + Then mappings for user "test" at domain "localhost" should contain only "forward:test@localhost2" Scenario: stored forward mapping should be retrieved when two mappings are matching Given store "test@localhost2" forward mapping for user "test" at domain "localhost" And store "test@james" forward mapping for user "test" at domain "localhost" - Then mappings for user "test" at domain "localhost" should contains only "forward:test@localhost2, forward:test@james" + Then mappings for user "test" at domain "localhost" should contain only "forward:test@localhost2, forward:test@james" Scenario: stored forward mapping should not be retrieved by another user Given store "test@localhost2" forward mapping for user "test" at domain "localhost" @@ -240,4 +240,4 @@ Feature: Rewrite Tables tests Given store "test@localhost2" forward mapping for user "test" at domain "localhost" And store "test@james" forward mapping for user "test" at domain "localhost" When user "test" at domain "localhost" removes a forward mapping "test@james" - Then mappings for user "test" at domain "localhost" should contains only "forward:test@localhost2" \ No newline at end of file + Then mappings for user "test" at domain "localhost" should contain only "forward:test@localhost2" \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org