Skip to content

Commit 60f399c

Browse files
committed
tests refactor
1 parent c69903f commit 60f399c

File tree

3 files changed

+2
-21
lines changed

3 files changed

+2
-21
lines changed

src/main/java/org/scm4j/releaser/ExtendedStatusBuilder.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ private boolean noValueableCommitsAfterLastTag(VCSRepository repo, ReleaseBranch
188188
return !tags.isEmpty();
189189
}
190190
if (!tags.isEmpty()) {
191+
// tested by testDelayedTagOnPatch
191192
return true;
192193
}
193194
return null;

src/test/java/org/scm4j/releaser/WorkflowPatchesTest.java

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ public void testPatches() throws Exception {
7474
}
7575

7676
@Test
77-
public void testBuildPatchOnExistingRelease() throws Exception {
77+
public void testBuildPatchOnPreviousRelease() throws Exception {
7878
// 2.59
7979
forkAndBuild(compUnTillDb);
8080

@@ -143,22 +143,6 @@ public void testExceptionMDepsNotLockedOnPatch() {
143143
}
144144
}
145145

146-
@Test
147-
public void testPatchDONEIfLastCommitTagged() throws Exception {
148-
// fork unTillDb
149-
forkAndBuild(compUnTillDb);
150-
151-
// add an igonored feature and tag it
152-
ReleaseBranchCurrent crb = ReleaseBranchFactory.getCRB(repoUnTillDb);
153-
Component compUnTillDbVersioned = compUnTillDb.clone(crb.getVersion());
154-
env.generateFeatureCommit(env.getUnTillDbVCS(), crb.getName(), LogTag.SCM_IGNORE + " feature merged");
155-
env.getUnTillDbVCS().createTag(crb.getName(), "tag", "tag", null);
156-
157-
ExtendedStatusBuilder statusBuilder = new ExtendedStatusBuilder(repoFactory);
158-
ExtendedStatus status = statusBuilder.getAndCachePatchStatus(compUnTillDbVersioned, new CachedStatuses());
159-
assertEquals(BuildStatus.DONE, status.getStatus());
160-
}
161-
162146
@Test
163147
public void testPatchDONEIfAllReleaseBranchCommitsIgnored() {
164148
forkAndBuild(compUnTillDb);

src/test/java/org/scm4j/releaser/WorkflowTestBase.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,6 @@ protected IAction execAndGetActionBuildDelayedTag(Component comp) {
394394
return execAndGetAction(CLICommand.BUILD.getCmdLineStr(), comp.getCoords().toString(), Option.DELAYED_TAG.getCmdLineStr());
395395
}
396396

397-
protected ExtendedStatus execAndGetNodeStatus(Component comp) {
398-
return execAndGetNode(null, CLICommand.STATUS.getCmdLineStr(), comp.getCoords().toString());
399-
}
400-
401397
protected void forkAndBuild(Component comp) {
402398
forkAndBuild(comp, 1);
403399
}

0 commit comments

Comments
 (0)