Package org.apache.felix.deploymentadmin.itest.util

Examples of org.apache.felix.deploymentadmin.itest.util.DeploymentPackageBuilder.createResource()


        System.setProperty("rp1", "commit");

        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .add(dpBuilder.createResourceProcessorResource().setUrl(getTestBundle("rp1")))
            .add(dpBuilder.createResource().setResourceProcessorPID(TEST_FAILING_BUNDLE_RP1).setUrl(getTestResource("test-config1.xml")))
            .add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3")));

        DeploymentPackage dp = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp);
View Full Code Here


        System.setProperty("rp1", "prepare");

        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .add(dpBuilder.createResourceProcessorResource().setUrl(getTestBundle("rp1")))
            .add(dpBuilder.createResource().setResourceProcessorPID(TEST_FAILING_BUNDLE_RP1).setUrl(getTestResource("test-config1.xml")));

        try {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a failing deployment package?!");
        }
View Full Code Here

        System.setProperty("rp1", "process");

        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .add(dpBuilder.createResourceProcessorResource().setUrl(getTestBundle("rp1")))
            .add(dpBuilder.createResource().setResourceProcessorPID(TEST_FAILING_BUNDLE_RP1).setUrl(getTestResource("test-config1.xml")));

        try {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a failing deployment package?!");
        }
View Full Code Here

        System.setProperty("rp1", "dropped");

        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .add(dpBuilder.createResourceProcessorResource().setUrl(getTestBundle("rp1")))
            .add(dpBuilder.createResource().setResourceProcessorPID(TEST_FAILING_BUNDLE_RP1).setUrl(getTestResource("test-config1.xml")));

        DeploymentPackage dp = installDeploymentPackage(dpBuilder);
        assertNotNull("No deployment package returned?!", dp);

        awaitRefreshPackagesEvent();
View Full Code Here

        System.setProperty("rp1", "start");

        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .add(dpBuilder.createResourceProcessorResource().setUrl(getTestBundle("rp1")))
            .add(dpBuilder.createResource().setResourceProcessorPID(TEST_FAILING_BUNDLE_RP1).setUrl(getTestResource("test-config1.xml")))
            .add(dpBuilder.createBundleResource().setUrl(getTestBundle("bundle3")));

        try {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a failing RP?!");
View Full Code Here

        assertBundleExists(getSymbolicName("rp1"), "1.0.0");

        dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .disableVerification()
            .add(dpBuilder.createResource().setResourceProcessorPID(TEST_FAILING_BUNDLE_RP1).setUrl(getTestResource("test-config1.xml")));

        try {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a resource with an non-existing RP?!");
        }
View Full Code Here

    @Test
    public void testInstallResourceWithNonAvailableCustomizerFail() throws Exception {
        DeploymentPackageBuilder dpBuilder = createNewDeploymentPackageBuilder("1.0.0");
        dpBuilder
            .disableVerification()
            .add(dpBuilder.createResource().setResourceProcessorPID("my.unknown.rp").setUrl(getTestResource("test-config1.xml")));

        try {
            installDeploymentPackage(dpBuilder);
            fail("Succeeded into installing a resource with an non-existing RP?!");
        }
View Full Code Here

    public void testCreateMinimalSingleResourceAndProcessorOk() throws Exception {
        DeploymentPackageBuilder dpBuilder = DeploymentPackageBuilder.create("dp-test", "1.0.0");
        dpBuilder
            .add(dpBuilder.createResourceProcessorResource()
                .setUrl(getTestBundle("rp1")))
            .add(dpBuilder.createResource()
                .setResourceProcessorPID("org.apache.felix.deploymentadmin.test.rp1")
                .setUrl(getTestResource("test-config1.xml"))
            );

        JarInputStream jis = new JarInputStream(dpBuilder.generate());
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.