Bug 486037

Summary: activationkey.create doesn't throw exception on negative usageLimit
Product: Red Hat Satellite 5 Reporter: John Matthews <jmatthew>
Component: APIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED NOTABUG QA Contact: John Matthews <jmatthew>
Severity: medium Docs Contact:
Priority: low    
Version: 530   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-18 16:11:25 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:    
Bug Blocks: 456996    

Description John Matthews 2009-02-17 23:14:22 UTC
Description of problem:

activationkey.create() from the xmlrpc apis, allows a negative "usageLimit" to be passed in.  The docs state "-1" is valid and will be considered as "unlimited".  Assumption is, other negative values would throw an exception.

Prior QA api tests were passing in a value of "-45" and expecting this to throw an exception with wording:
Usage Limit cannot be less than 0.




Version-Release number of selected component (if applicable):
Satellite-5.3.0-RHEL5-re20090213.1-i386-embedded-oracle.iso

How reproducible:
always

Steps to Reproduce:
1. Run test: com.redhat.rhn.rpc.api.activationkey.create::testActivationkeyCreateWithNegativeUsageLimit()
2. Observe no exception is thrown.
3.
  
Actual results:
exception is thrown

Expected results:
no exception thrown, key is set to "unlimited" usage.

Comment 1 John Matthews 2009-02-18 16:11:25 UTC
Turns out I had a configuration error in api automation setup and was running against an older ISO.

Closing this as it works as intended with current iso.