Bug 2181538

Summary: Certificate Serial Number printed as float, not int
Product: Red Hat Enterprise Linux 8 Reporter: Michal Polovka <mpolovka>
Component: ipaAssignee: Florence Blanc-Renaud <frenaud>
Status: NEW --- QA Contact: Michal Polovka <mpolovka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.8CC: abokovoy, rcritten, rjeffman, tscherf
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.