Bug 2181538 - Certificate Serial Number printed as float, not int
Summary: Certificate Serial Number printed as float, not int
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.8
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Florence Blanc-Renaud
QA Contact: Michal Polovka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-24 13:11 UTC by Michal Polovka
Modified: 2023-07-31 12:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FREEIPA-9355 0 None None None 2023-07-31 12:29:53 UTC
Red Hat Issue Tracker FREEIPA-9607 0 None None None 2023-03-27 08:45:43 UTC
Red Hat Issue Tracker RHELPLAN-153136 0 None None None 2023-03-27 08:45:48 UTC

Description Michal Polovka 2023-03-24 13:11:58 UTC
Description of problem:
The test  test_webui/test_user.py::test_user::()::test_certificate_serial caught 

self = <ipatests.test_webui.test_user.test_user object at 0x7fc61f6ae198>
selector = 'div[name="cert-serial-num"]'
value = '264374074076456325397645183544606453821', parent = None

    def assert_text(self, selector, value, parent=None):
        """
        Assert read-only text value in details page or in a form
        """
        text = self.get_text(selector, parent)
        text = text.strip()
        value = value.strip()
>       assert text == value, "Invalid value: '%s' Expected: %s" % (text, value)
E       AssertionError: Invalid value: '2.6437407407645632e+38' Expected: 264374074076456325397645183544606453821

parent     = None
selector   = 'div[name="cert-serial-num"]'
self       = <ipatests.test_webui.test_user.test_user object at 0x7fc61f6ae198>
text       = '2.6437407407645632e+38'
value      = '264374074076456325397645183544606453821'

Version-Release number of selected component (if applicable):
ipa-server-4.9.11-3.module+el8.8.0+17608+39b88723.x86_64

How reproducible:
always

Steps to Reproduce:
1. Either run test_webui/test_user.py::test_user::()::test_certificate_serial or 

1. Add certificate via webUI
3. Check certificate number

Actual results:
The certificate number is represented in scientific notation

Expected results:
The certificate number is represented as an integer

Additional info:
May be related to https://pagure.io/freeipa/issue/8754

Comment 1 Rob Crittenden 2023-03-24 14:01:33 UTC
This is almost certainly related to random serial numbers.


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