src/test/java/com/digitalglobe/util/maven/plugin/TestCloudFormationDeploy.java
/**
     * Use this method to test the Deploy Maven Plugin for the default provider chain.  Also tests the create
     * stack scenario.
     */
Use this method to test the Deploy Maven Plugin for the default provider chain.  Also tests the create
stack scenario.
Use this method to test the Deploy Maven Plugin for the default provider chain . Also tests the create stack scenario .
@Test(groups = {"unit"})
    public void TestDefaultProviderDeploy() throws Exception {
        StackScenario.createTest = true;
        StackScenario.changeset = true;
        OverridePlugin plugin = new OverridePlugin();
        String stackPath = this.getClass().getClassLoader().getResource("Test-Template.json").getPath();
        String parameterPath = this.getClass().getClassLoader().getResource("Test-Parameters.json").getPath();
        Exception ex = plugin.beginTesting("bucket", null, "Test", "test-repository",
                "com.test", "application-test", "1.0", "Test", stackPath,
                new String[] {parameterPath}, null,
                new CloudFormationDeployMavenPlugin.StackInputParameter[]
                        {
                                new CloudFormationDeployMavenPlugin.StackInputParameter()
                                        .withParameterName("s3Bucket")
                                        .withMatchingParameterName("ArtifactS3Bucket"),
                                new CloudFormationDeployMavenPlugin.StackInputParameter()
                                        .withParameterName("s3Key")
                                        .withMatchingParameterName("ArtifactS3Key")
                        }, null);
        Assert.assertNull(ex);
        validateLogFile(false, false, false);
    }
@ Test ( groups = { "unit" } ) public void TestDefaultProviderDeploy ( ) throws Exception { StackScenario . createTest = true ; StackScenario . changeset = true ; OverridePlugin plugin = new OverridePlugin ( ) ; String stackPath = this . getClass ( ) . getClassLoader ( ) . getResource ( "Test-Template.json" ) . getPath ( ) ; String parameterPath = this . getClass ( ) . getClassLoader ( ) . getResource ( "Test-Parameters.json" ) . getPath ( ) ; Exception ex = plugin . beginTesting ( "bucket" , null , "Test" , "test-repository" , "com.test" , "application-test" , "1.0" , "Test" , stackPath , new String [ ] { parameterPath } , null , new CloudFormationDeployMavenPlugin . StackInputParameter [ ] { new CloudFormationDeployMavenPlugin . StackInputParameter ( ) . withParameterName ( "s3Bucket" ) . withMatchingParameterName ( "ArtifactS3Bucket" ) , new CloudFormationDeployMavenPlugin . StackInputParameter ( ) . withParameterName ( "s3Key" ) . withMatchingParameterName ( "ArtifactS3Key" ) } , null ) ; Assert . assertNull ( ex ) ; validateLogFile ( false , false , false ) ; }
Use this method to test the Deploy Maven Plugin for the default provider chain.
Use this method to test the Deploy Maven Plugin for the default provider chain .
// Validating the output log file to determine if the function ran successfully.