Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instability of the /user-repo/scan REST API endpoint #134

Open
tisnik opened this issue Jan 21, 2019 · 0 comments
Open

Instability of the /user-repo/scan REST API endpoint #134

tisnik opened this issue Jan 21, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@tisnik
Copy link
Member

tisnik commented Jan 21, 2019

The REST API endpoint /user-repo/scan is unstable from time to time. It returns HTTP code 504 when HTTP 200/OK is expected.

Please see the following e2e tests results:

  Scenario: Check the Gemini API /api/v1/user-repo/scan response                                           # features/gemini.feature:92

    Given Gemini service is running                                                                        # features/steps/gemini.py:18

    And Gemini service git url is https://github.com/jitpack/maven-simple                                  # features/steps/gemini.py:24

    And Gemini service git sha is 9466faa13d65044c8430b418327df826f13ca07a                                 # features/steps/gemini.py:30

    When I post to Gemini API /api/v1/user-repo/scan                                                       # features/steps/gemini.py:80

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): gemini.api.prod-preview.openshift.io

    Then I should get 401 status code                                                                      # features/steps/common.py:90

    And I should receive JSON response containing the error key                                            # features/steps/common.py:116

    And I should find the text "Authentication failed" stored under the key error                          # features/steps/common.py:129

    When I acquire the authorization token                                                                 # features/steps/authorization.py:36

    Then I should get the proper authorization token                                                       # features/steps/authorization.py:22

    When I post to Gemini API /api/v1/user-repo/scan with authorization token                              # features/steps/gemini.py:80

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): gemini.api.prod-preview.openshift.io

    Then I should get 200 status code                                                                      # features/steps/common.py:90

      Assertion Failed: assert 504 == 200

       +  where 504 = <Response [504]>.status_code

       +    where <Response [504]> = <behave.runner.Context object at 0x7f4049aefe10>.response

      Captured logging:

      INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): gemini.api.prod-preview.openshift.io

      INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): gemini.api.prod-preview.openshift.io
@tisnik tisnik added the bug Something isn't working label Jan 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant