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

Improve our approach for testing auth (part 1) #9681

Merged
merged 29 commits into from
Feb 21, 2024

Commits on Oct 23, 2023

  1. improve stackexchange auth testing

    Change auth tests to include all shields of the base class.
    The code is formated to be used in more general cases and increases code reuseability.
    jNullj committed Oct 23, 2023
    Configuration menu
    Copy the full SHA
    764582e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2e913a7 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2024

  1. Configuration menu
    Copy the full SHA
    ae1a231 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b2c2a18 View commit details
    Browse the repository at this point in the history

Commits on Jan 16, 2024

  1. Remove dummy auth test

    We already test all existing classes, no need for a dummy
    jNullj committed Jan 16, 2024
    Configuration menu
    Copy the full SHA
    9dd597d View commit details
    Browse the repository at this point in the history

Commits on Jan 20, 2024

  1. Add getBadgeExampleCall to test-helpers

    Add getBadgeExampleCall to extract the first OpenAPI example then reformat it for service invoke function.
    jNullj committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    7bc3cc0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6da3af View commit details
    Browse the repository at this point in the history
  3. Fix getBadgeExampleCall Errors

    jNullj committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    31c3f94 View commit details
    Browse the repository at this point in the history
  4. Add testAuth to test-helpers

    Add the testAuth function which tests auth of a service (badge) using a provided dummy response.
    jNullj committed Jan 20, 2024
    Configuration menu
    Copy the full SHA
    18ec387 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1688e58 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    609c017 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2024

  1. Add all auth methods to testAuth

    Add all auth methods used to testAuth to be generic and used by all services.
    Add helper functions to make testAuth more readable
    jNullj committed Feb 10, 2024
    Configuration menu
    Copy the full SHA
    ffc7800 View commit details
    Browse the repository at this point in the history

Commits on Feb 11, 2024

  1. Configuration menu
    Copy the full SHA
    3e5c98d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    876708f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1ddd577 View commit details
    Browse the repository at this point in the history
  4. Fix basic auth user

    jNullj committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    c41f60f View commit details
    Browse the repository at this point in the history
  5. Add dynamic authorizedOrigins

    jNullj committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    f4cc1af View commit details
    Browse the repository at this point in the history
  6. Add header optional argument

    jNullj committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    b471c5c View commit details
    Browse the repository at this point in the history
  7. Add obs as basicAuth example

    jNullj committed Feb 11, 2024
    Configuration menu
    Copy the full SHA
    7aadc10 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Use apiHeaderKey and bearerHeaderKey function params

    Use apiHeaderKey & bearerHeaderKey as function params rather then extracting them with regex from function strings.
    
    Those options are now part of an options object param joined with the contentType that replaces header.
    
    header was originaly added for setting content type of the reply, so it makes more sense to directly set the content type
    jNullj committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    79dc536 View commit details
    Browse the repository at this point in the history
  2. Remove old comment

    jNullj committed Feb 13, 2024
    Configuration menu
    Copy the full SHA
    d1435c2 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2024

  1. Allow any pass & user key for QueryStringAuth

    Before this commit the QueryStringAuth would only work for the key of stackexchange.
    This commit makes the testAuth function generic and allows passing user and pass keys.
    jNullj committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    a53f716 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    14d0789 View commit details
    Browse the repository at this point in the history
  3. Fix wrong header for jwt login

    Might set wrong header for jwt login request.
    This commit fixes that.
    jNullj committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    d22de8a View commit details
    Browse the repository at this point in the history
  4. Support multiple authOrigins in testAuth

    Some services might have more then one authOrigin.
    This commit makes sure we test for redundent authOrigins as well as support requests to them if needed.
    jNullj committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    50f4144 View commit details
    Browse the repository at this point in the history
  5. Add docker-automated auth test

    jNullj committed Feb 16, 2024
    Configuration menu
    Copy the full SHA
    2d310bd View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2024

  1. Fix JwtAuth testing by introducing mandatory jwtLoginEndpoint

    Prior to this change, JwtAuth testing would lead to erros due to the absence of a specified login endpoint,
    Nock would be dumplicated for both login and non login hosts and indicate a missing request.
    
    This commit enforces the requirement for a new jwtLoginEndpoint argument when testing JwtAuth.
    The argument seperates the endpoint nock scope from the behavior of the request nock.
    jNullj committed Feb 17, 2024
    Configuration menu
    Copy the full SHA
    1b79b4c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    419bd01 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Configuration menu
    Copy the full SHA
    a2b838c View commit details
    Browse the repository at this point in the history