Skip to content

Commit

Permalink
only check error code in postbuild script
Browse files Browse the repository at this point in the history
  • Loading branch information
jjiwooLim committed Oct 20, 2023
1 parent 8939b7f commit 069f67e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import java.io.File;

File buildLog = new File( basedir, 'build.log' )
assert buildLog.text.contains( 'All features were successfully verified.')
assert buildLog.text.contains( 'CWWKF1514E: The 0X05534365803788CE public key ID does not match the 0xWRONGKEYID provided key ID.')
assert buildLog.text.contains( 'All features were successfully verified.')
assert buildLog.text.contains( 'CWWKF1508E: The public key ID for the src/test/resources/SimpleActivatorValidKey.asc key URL was not provided.')
assert buildLog.text.contains( 'CWWKF1512E: Unable to verify the following feature signatures:')
/*CWWKF1514E: The 0X05534365803788CE public key ID does not match the 0xWRONGKEYID provided key ID.*/
assert buildLog.text.contains( 'CWWKF1514E')
/*CWWKF1508E: The public key ID for the src/test/resources/SimpleActivatorValidKey.asc key URL was not provided.*/
assert buildLog.text.contains( 'CWWKF1508E')
/*CWWKF1512E: Unable to verify the following feature signatures:*/
assert buildLog.text.contains( 'CWWKF1512E')
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,5 @@ public void testVerifyUsrFeature() throws Exception {
throw new AssertionError ("Fail to install user feature.", e);
}
}

@Test
public void testInvalidVerifyUsrFeature() throws Exception {
Assume.assumeTrue(System.getProperty("verify").equals("all"));
Assume.assumeTrue(System.getProperty("keyid").equals("0xWRONGKEYID"));
try {
File featureFile = new File("target/liberty/wlp/usr/extension/lib/features/test.user.test.osgi.SimpleActivator.mf");
assert !featureFile.exists() : "SimpleActivator.mf should not be generated";

} catch (Exception e) {
throw new AssertionError ("Fail to install user feature.", e);
}
}




}

0 comments on commit 069f67e

Please sign in to comment.