diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2019-03-01 08:17:32 -0600 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2019-03-06 11:30:44 +0100 |
commit | f02eeba4ef9908da5d6e5ea969e91a22c6c443cd (patch) | |
tree | c2cee4e353bc2ac5fb909378624d592b988c6162 /sonar-core/src/test | |
parent | b41f2655daa7d58a272f0f98ac1ec16ff10f6e24 (diff) | |
download | sonarqube-f02eeba4ef9908da5d6e5ea969e91a22c6c443cd.tar.gz sonarqube-f02eeba4ef9908da5d6e5ea969e91a22c6c443cd.zip |
SONAR-11561 Allow more special characters in branch names
Diffstat (limited to 'sonar-core/src/test')
-rw-r--r-- | sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java index d4f45a69769..a328a0c586b 100644 --- a/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java +++ b/sonar-core/src/test/java/org/sonar/core/component/ComponentKeysTest.java @@ -68,14 +68,14 @@ public class ComponentKeysTest { @Test public void isValidBranchKey() { - assertThat(ComponentKeys.isValidBranch("")).isTrue(); - assertThat(ComponentKeys.isValidBranch("abc")).isTrue(); - assertThat(ComponentKeys.isValidBranch("0123")).isTrue(); - assertThat(ComponentKeys.isValidBranch("ab 12")).isFalse(); - assertThat(ComponentKeys.isValidBranch("ab_12")).isTrue(); - assertThat(ComponentKeys.isValidBranch("ab/12")).isTrue(); - assertThat(ComponentKeys.isValidBranch("ab\\12")).isFalse(); - assertThat(ComponentKeys.isValidBranch("ab\n")).isFalse(); + assertThat(ComponentKeys.isValidLegacyBranch("")).isTrue(); + assertThat(ComponentKeys.isValidLegacyBranch("abc")).isTrue(); + assertThat(ComponentKeys.isValidLegacyBranch("0123")).isTrue(); + assertThat(ComponentKeys.isValidLegacyBranch("ab 12")).isFalse(); + assertThat(ComponentKeys.isValidLegacyBranch("ab_12")).isTrue(); + assertThat(ComponentKeys.isValidLegacyBranch("ab/12")).isTrue(); + assertThat(ComponentKeys.isValidLegacyBranch("ab\\12")).isFalse(); + assertThat(ComponentKeys.isValidLegacyBranch("ab\n")).isFalse(); } @Test |