Bug 486037 - activationkey.create doesn't throw exception on negative usageLimit
Summary: activationkey.create doesn't throw exception on negative usageLimit
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Brad Buckingham
QA Contact: John Matthews
URL:
Whiteboard:
Depends On:
Blocks: 456996
TreeView+ depends on / blocked
 
Reported: 2009-02-17 23:14 UTC by John Matthews
Modified: 2009-02-25 21:16 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-02-18 16:11:25 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.