-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integration Tests and implementation for manipulating versions for fo…
…rced deployment of OTHER branches (long-running POCs).
- Loading branch information
Showing
5 changed files
with
163 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
src/test/java/com/e_gineering/maven/gitflowhelper/OtherBranchIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package com.e_gineering.maven.gitflowhelper; | ||
|
||
import org.apache.maven.it.Verifier; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.junit.runners.BlockJUnit4ClassRunner; | ||
|
||
@RunWith(BlockJUnit4ClassRunner.class) | ||
public class OtherBranchIT extends AbstractIntegrationTest { | ||
@Test | ||
public void featureSnapshotSemVer() throws Exception { | ||
Verifier verifier = createVerifier("/project-stub", "origin/feature/my-feature-branch", "5.0.0-SNAPSHOT"); | ||
try { | ||
verifier.getCliOptions().add("-Dgitflow.force.other.deploy=semver"); | ||
verifier.executeGoal("deploy"); | ||
|
||
verifier.verifyTextInLog("Artifact versions updated with semVer build metadata: +origin-feature-my-feature-branch"); | ||
verifier.verifyErrorFreeLog(); | ||
} finally { | ||
verifier.resetStreams(); | ||
} | ||
} | ||
|
||
@Test | ||
public void featureSnapshotOverwrite() throws Exception { | ||
Verifier verifier = createVerifier("/project-stub", "origin/feature/my-feature-branch", "5.0.0-SNAPSHOT"); | ||
try { | ||
verifier.getCliOptions().add("-Dgitflow.force.other.deploy=overwrite"); | ||
verifier.executeGoal("deploy"); | ||
|
||
verifier.verifyTextInLog("DANGER! DANGER, WILL ROBINSON!"); | ||
verifier.verifyErrorFreeLog(); | ||
} finally { | ||
verifier.resetStreams(); | ||
} | ||
} | ||
|
||
@Test | ||
public void featureSemVer() throws Exception { | ||
Verifier verifier = createVerifier("/project-stub", "origin/feature/my-feature-branch.with.other.identifiers", "5.0.1"); | ||
try { | ||
verifier.getCliOptions().add("-Dgitflow.force.other.deploy=semver"); | ||
verifier.executeGoal("deploy"); | ||
|
||
verifier.verifyTextInLog("Artifact versions updated with semVer build metadata: +origin-feature-my-feature-branch.with.other.identifiers"); | ||
verifier.verifyErrorFreeLog(); | ||
} finally { | ||
verifier.resetStreams(); | ||
} | ||
} | ||
|
||
@Test | ||
public void featureOverwrite() throws Exception { | ||
Verifier verifier = createVerifier("/project-stub", "origin/feature/my-feature-branch", "5.0.1"); | ||
try { | ||
verifier.getCliOptions().add("-Dgitflow.force.other.deploy=overwrite"); | ||
verifier.executeGoal("deploy"); | ||
|
||
verifier.verifyTextInLog("DANGER! DANGER, WILL ROBINSON!"); | ||
verifier.verifyErrorFreeLog(); | ||
} finally { | ||
verifier.resetStreams(); | ||
} | ||
} | ||
|
||
} |