Package com.atlassian.jgitflow.core

Examples of com.atlassian.jgitflow.core.ReleaseMergeResult.wasSuccessful()


        File junkFile = new File(git.getRepository().getWorkTree(), "junk.txt");
        FileUtils.writeStringToFile(junkFile, "I am junk");

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();
        assertTrue(result.wasSuccessful());
    }

    @Test(expected = DirtyWorkingTreeException.class)
    public void finishReleaseUnCommittedFile() throws Exception
    {
View Full Code Here


        FileUtils.writeStringToFile(junkFile, "I am junk");
        git.add().addFilepattern(junkFile.getName()).call();

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();
        assertTrue(result.wasSuccessful());
    }

    @Test
    public void finishReleaseWithNewCommit() throws Exception
    {
View Full Code Here

        assertFalse(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        assertFalse(GitHelper.isMergedInto(git, commit, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").setNoMerge(true).call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        //just in case
        assertEquals(flow.getReleaseBranchPrefix() + "1.0", git.getRepository().getBranch());

        ReleaseMergeResult result = flow.releaseFinish("1.0").setKeepBranch(true).call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should still exist
View Full Code Here

        assertFalse(GitHelper.isMergedInto(git, commit2, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        assertFalse(GitHelper.isMergedInto(git, commit2, flow.getDevelopBranchName()));

        //try to finish
        ReleaseMergeResult result = flow.releaseFinish("1.0").setSquash(true).call();

        assertTrue(result.wasSuccessful());

        //we should be on develop branch
        assertEquals(flow.getDevelopBranchName(), git.getRepository().getBranch());

        //release branch should be gone
View Full Code Here

        remoteGit.add().addFilepattern(junkFile.getName()).call();
        remoteGit.commit().setMessage("adding junk file").call();

        ReleaseMergeResult result = flow.releaseFinish("1.0").setFetch(true).call();

        assertTrue(result.wasSuccessful());

    }

    @Test(expected = BranchOutOfDateException.class)
    public void finishReleaseMasterBehindRemoteWithFetch() throws Exception
View Full Code Here

        remoteGit.add().addFilepattern(junkFile.getName()).call();
        remoteGit.commit().setMessage("adding junk file").call();

        ReleaseMergeResult result = flow.releaseFinish("1.0").setFetch(true).call();

        assertTrue(result.wasSuccessful());

    }
   
    //TODO: add tests for push and tag flags
    @Test
View Full Code Here

        flow.git().add().addFilepattern(junkFile.getName()).call();
        RevCommit localcommit = flow.git().commit().setMessage("adding junk file").call();

        ReleaseMergeResult result = flow.releaseFinish("1.0").setPush(true).call();
       
        assertTrue(result.wasSuccessful());
       
        assertTrue(GitHelper.isMergedInto(remoteGit, localcommit, flow.getMasterBranchName()));
        assertTrue(GitHelper.isMergedInto(remoteGit, localcommit, flow.getDevelopBranchName()));
        assertFalse(GitHelper.remoteBranchExists(git,flow.getReleaseBranchPrefix() + "1.0",flow.getReporter()));
        assertFalse(GitHelper.localBranchExists(remoteGit,flow.getReleaseBranchPrefix() + "1.0"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.