Bug 796415

Summary: JON 3.01, RC5 Document CLI assert functionality
Product: [Other] RHQ Project Reporter: Mike Foley <mfoley>
Component: DocumentationAssignee: Deon Ballard <dlackey>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.3CC: hrupp, lkrejci
Target Milestone: ---   
Target Release: JON 3.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 796405 Environment:
Last Closed: 2012-06-21 23:16:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 796405, 796680    
Bug Blocks:    

Description Mike Foley 2012-02-22 20:29:28 UTC
JON 3.01, RC5 Document CLI assert functionality.  It is not documented.  Consider including it in API, samples, or elsewhere.  Please include it in new CLI documentation plans.


+++ This bug was initially created as a clone of Bug #796405 +++

Description of problem:
The CLI is documented to have a series of assert* functions available for the scripts to use. These don't work in the server because we fail to bundle testng.jar in server's lib.

Version-Release number of selected component (if applicable):
4.3.0-SNAPSHOT

How reproducible:
always

Steps to Reproduce:
1. Create a CLI script with the following body:
assertNotNull(null);

2. Define an alert with the above script as a notification
3. Let the alert fire
  
Actual results:
The script seems to have succeeded but the server log contains a NoClassDefFoundError of org/testng/Assert.

Expected results:
The assertion should have executed correctly and produced expected result (in this case, it should throw an AssertionError which should make the notification fail and produce an appropriate error message).

Additional info:

--- Additional comment from mfoley on 2012-02-22 15:21:15 EST ---

can you document a reference to where you see the assert* statements documented?  i actually can't find this in the JON documentation (and if it is not documented, clone a doc BZ ... if needed)

Comment 1 Lukas Krejci 2012-02-23 13:24:45 UTC
Note that unless bug 796680 is fixed for JON 3.0.1 the assert statements *are not* going to work in the server-side CLI script alert notifications. The assert statements *are* working in the standalone CLI regardless of that bug being fixed.

Comment 3 Deon Ballard 2012-06-21 23:16:31 UTC
Closing.