diff --git a/src/test/java/org/scm4j/releaser/conf/VCSRepositoryFactoryTest.java b/src/test/java/org/scm4j/releaser/conf/VCSRepositoryFactoryTest.java index a87c976d..7751cf60 100644 --- a/src/test/java/org/scm4j/releaser/conf/VCSRepositoryFactoryTest.java +++ b/src/test/java/org/scm4j/releaser/conf/VCSRepositoryFactoryTest.java @@ -3,6 +3,7 @@ import com.google.common.io.Resources; import org.junit.Before; import org.junit.Test; +import org.scm4j.commons.URLContentLoader; import org.scm4j.releaser.exceptions.EComponentConfigNoUrl; import java.io.File; @@ -17,12 +18,15 @@ public class VCSRepositoryFactoryTest { @Before public void setUp() throws Exception { - File ccFile = new File(Resources.getResource(this.getClass(), "urls-omap.yml").toURI()); + File urlsMapping = new File(Resources.getResource(this.getClass(), "urls-mapping.yml").toURI()); + File urlsSeq = new File(Resources.getResource(this.getClass(), "urls-sequence.yml").toURI()); + File urlsSeqOmap = new File(Resources.getResource(this.getClass(), "urls-sequence-omap.yml").toURI()); File credsFile = new File(Resources.getResource(this.getClass(), "creds.yml").toURI()); IConfigUrls configUrls = new IConfigUrls() { @Override public String getCCUrls() { - return ccFile.toString(); + return urlsMapping.toString() + URLContentLoader.URL_SEPARATOR + + urlsSeq.toString() + URLContentLoader.URL_SEPARATOR + urlsSeqOmap.toString(); } @Override diff --git a/src/test/resources/org/scm4j/releaser/conf/urls-mapping.yml b/src/test/resources/org/scm4j/releaser/conf/urls-mapping.yml new file mode 100644 index 00000000..cc246bfd --- /dev/null +++ b/src/test/resources/org/scm4j/releaser/conf/urls-mapping.yml @@ -0,0 +1,8 @@ +artA1|artA2: + url: http://url.com/svn/prjA +my(.*): + url: http://localhost/git/myProj$1 + type: git + releaseBranchPrefix: B + developBranch: dev + releaseCommand: gradlew \ No newline at end of file diff --git a/src/test/resources/org/scm4j/releaser/conf/urls-omap.yml b/src/test/resources/org/scm4j/releaser/conf/urls-omap.yml deleted file mode 100644 index c27fe286..00000000 --- a/src/test/resources/org/scm4j/releaser/conf/urls-omap.yml +++ /dev/null @@ -1,22 +0,0 @@ -!!omap -- artA1|artA2: - url: http://url.com/svn/prjA -- my(.*): - url: http://localhost/git/myProj$1 - type: git - releaseBranchPrefix: B - developBranch: dev - releaseCommand: gradlew -- git1: - url: http://localhost/git/myProj.git - type: null -- git2: - url: http://localhost/git/myProj - type: null -- svn1: - url: http://localhost/myProj - type: subversion -- ~: - url: https://github.com/qwerty/$0 - type: svn - developBranch: branches/ diff --git a/src/test/resources/org/scm4j/releaser/conf/urls-sequence-omap.yml b/src/test/resources/org/scm4j/releaser/conf/urls-sequence-omap.yml new file mode 100644 index 00000000..ed8c6e2c --- /dev/null +++ b/src/test/resources/org/scm4j/releaser/conf/urls-sequence-omap.yml @@ -0,0 +1,8 @@ +!!omap +- svn1: + url: http://localhost/myProj + type: subversion +- ~: + url: https://github.com/qwerty/$0 + type: svn + developBranch: branches/ \ No newline at end of file diff --git a/src/test/resources/org/scm4j/releaser/conf/urls-sequence.yml b/src/test/resources/org/scm4j/releaser/conf/urls-sequence.yml new file mode 100644 index 00000000..49d7ca49 --- /dev/null +++ b/src/test/resources/org/scm4j/releaser/conf/urls-sequence.yml @@ -0,0 +1,6 @@ +- git1: + url: http://localhost/git/myProj.git + type: null +- git2: + url: http://localhost/git/myProj + type: null \ No newline at end of file