Examples of TestContext


Examples of org.apache.falcon.resource.TestContext

    public void testSubmitEntityValidCommands() throws Exception {

        FalconCLI.OUT.set(stream);

        String filePath;
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();

        filePath = TestContext.overlayParametersOverTemplate(TestContext.CLUSTER_TEMPLATE, overlay);
        Assert.assertEquals(
                0,
                executeWithURL("entity -submit -type cluster -file " + filePath));
        context.setCluster(overlay.get("cluster"));
        Assert.assertEquals(stream.buffer.toString().trim(),
                "falcon/default/Submit successful (cluster) " + context.getClusterName());

        filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
        Assert.assertEquals(0,
                executeWithURL("entity -submit -type feed -file " + filePath));
        Assert.assertEquals(
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    public void testSubmitAndScheduleEntityValidCommands() throws Exception {

        String filePath;
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();

        filePath = TestContext.overlayParametersOverTemplate(context.getClusterFileTemplate(), overlay);
        Assert.assertEquals(-1,
                executeWithURL("entity -submitAndSchedule -type cluster -file "
                        + filePath));
        context.setCluster(overlay.get("cluster"));

        filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
        Assert.assertEquals(0,
                executeWithURL("entity -submitAndSchedule -type feed -file "
                        + filePath));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    public void testValidateValidCommands() throws Exception {

        String filePath;
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();

        filePath = TestContext.overlayParametersOverTemplate(context.getClusterFileTemplate(), overlay);
        Assert.assertEquals(0,
                executeWithURL("entity -validate -type cluster -file "
                        + filePath));
        context.setCluster(overlay.get("cluster"));
        Assert.assertEquals(
                0,
                executeWithURL("entity -submit -type cluster -file " + filePath));
        context.setCluster(overlay.get("cluster"));

        filePath = TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
        Assert.assertEquals(0,
                executeWithURL("entity -validate -type feed -file " + filePath));
        Assert.assertEquals(0,
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

                0,
                executeWithURL("entity -submit -type process -file " + filePath));
    }

    public void testDefinitionEntityValidCommands() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -definition -type cluster -name "
                        + overlay.get("cluster")));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    public void testScheduleEntityValidCommands() throws Exception {

        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(-1,
                executeWithURL("entity -schedule -type cluster -name "
                        + overlay.get("cluster")));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    public void testSuspendResumeStatusEntityValidCommands() throws Exception {

        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(
                0,
                executeWithURL("entity -status -type feed -name "
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

        Assert.assertEquals(-1, executeWithURL("entity -type cluster "));
    }

    public void testDeleteEntityValidCommands() throws Exception {

        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(
                -1,
                executeWithURL("entity -delete -type cluster -name "
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

    }

    public void testInvalidCLIEntitycommands() throws Exception {

        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        TestContext.overlayParametersOverTemplate(TestContext.FEED_TEMPLATE1, overlay);
        Assert.assertEquals(-1,
                executeWithURL("entity -submit -type feed -name " + "name"));

        Assert.assertEquals(-1,
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

        Assert.assertEquals(-1,
                executeWithURL("entity -schedule -type feed -file " + "name"));
    }

    public void testInstanceRunningAndStatusCommands() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));
View Full Code Here

Examples of org.apache.falcon.resource.TestContext

                        + overlay.get("processName")
                        + " -start " + START_INSTANCE));
    }

    public void testInstanceRunningAndSummaryCommands() throws Exception {
        TestContext context = new TestContext();
        Map<String, String> overlay = context.getUniqueOverlay();
        submitTestFiles(context, overlay);

        Assert.assertEquals(0,
                executeWithURL("entity -schedule -type process -name "
                        + overlay.get("processName")));
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.