src/test/java/com/digitalglobe/util/maven/plugin/TestCloudFormationDeploy.java
/**
     * Use this method to test the Deploy Maven Plugin for an assumed role.  Also tests the update stack
     * scenario.
     */
Use this method to test the Deploy Maven Plugin for an assumed role.  Also tests the update stack
scenario.
Use this method to test the Deploy Maven Plugin for an assumed role . Also tests the update stack scenario .
@Test(groups = {"unit"})
    public void TestRoleDeploy() throws Exception {
        StackScenario.createTest = false;
        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","aws:iam::1111:role/test", "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(true, false, false);
    }
@ Test ( groups = { "unit" } ) public void TestRoleDeploy ( ) throws Exception { StackScenario . createTest = false ; 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" , "aws:iam::1111:role/test" , "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 ( true , false , false ) ; }
Use this method to test the Deploy Maven Plugin for an assumed role.
Use this method to test the Deploy Maven Plugin for an assumed role .
// Validate the log information to determine if the function ran successfully.