soap: complete check status system (#83473) #402

Merged
tnoel merged 1 commits from wip/83473-soap-add-check-status into main 2023-11-14 14:35:55 +01:00
Owner
No description provided.
tnoel added 1 commit 2023-11-14 11:00:19 +01:00
gitea/passerelle/pipeline/head There was a failure building this commit Details
93747f7133
soap: complete check status system (#83473)
tnoel force-pushed wip/83473-soap-add-check-status from 93747f7133 to 9e8321094b 2023-11-14 11:14:02 +01:00 Compare
tnoel force-pushed wip/83473-soap-add-check-status from 9e8321094b to ef5c642f93 2023-11-14 11:33:06 +01:00 Compare
tnoel changed title from WIP: soap: complete check status system (#83473) to soap: complete check status system (#83473) 2023-11-14 11:53:21 +01:00
Author
Owner

Pas de test ajouté, le code est couvert cependant.

Pas de test ajouté, le code est couvert cependant.
Owner

Voilà pour un test.

Voilà pour un test.
Author
Owner

Voilà pour un test.

Le test ne passe pas chez moi ...

    def test_status_down_then_up(db, app, admin_user):
        app = login(app)
        broken_wsdl_content = SOAP11.WSDL_CONTENT[:100]
        conn = SOAPConnector.objects.create(
            slug='test', wsdl_url=SOAP11.WSDL_URL, zeep_strict=True, zeep_xsd_ignore_sequence_order=False
        )
        with responses.RequestsMock() as rsps:
            rsps.get(SOAP11.WSDL_URL, status=200, body=broken_wsdl_content)
            app.get('/soap/test/')
            assert conn.get_availability_status().status == 'down'
    
        with responses.RequestsMock() as rsps:
            rsps.get(SOAP11.WSDL_URL, status=200, body=SOAP11.WSDL_CONTENT)
            app.get('/soap/test/')
>           assert conn.get_availability_status().status == 'up'
E           AssertionError: assert 'down' == 'up'
E             - up
E             + down

> Voilà pour un test. Le test ne passe pas chez moi ... ``` def test_status_down_then_up(db, app, admin_user): app = login(app) broken_wsdl_content = SOAP11.WSDL_CONTENT[:100] conn = SOAPConnector.objects.create( slug='test', wsdl_url=SOAP11.WSDL_URL, zeep_strict=True, zeep_xsd_ignore_sequence_order=False ) with responses.RequestsMock() as rsps: rsps.get(SOAP11.WSDL_URL, status=200, body=broken_wsdl_content) app.get('/soap/test/') assert conn.get_availability_status().status == 'down' with responses.RequestsMock() as rsps: rsps.get(SOAP11.WSDL_URL, status=200, body=SOAP11.WSDL_CONTENT) app.get('/soap/test/') > assert conn.get_availability_status().status == 'up' E AssertionError: assert 'down' == 'up' E - up E + down ```
ecazenave force-pushed wip/83473-soap-add-check-status from ef5c642f93 to 8f51257837 2023-11-14 13:56:24 +01:00 Compare
ecazenave force-pushed wip/83473-soap-add-check-status from 8f51257837 to 3cdf6364d4 2023-11-14 14:24:11 +01:00 Compare
ecazenave approved these changes 2023-11-14 14:34:45 +01:00
tnoel merged commit 08fa0fad21 into main 2023-11-14 14:35:55 +01:00
tnoel deleted branch wip/83473-soap-add-check-status 2023-11-14 14:35:55 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: entrouvert/passerelle#402
No description provided.