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

V1 provider compatibility suite #631

Merged
merged 15 commits into from
Mar 22, 2024
Merged

Commits on Mar 20, 2024

  1. fix(v3): allow optional publish options

    Most of the publish option arguments are optional, but the initial
    implementation had these as compulsory.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    be40cbd View commit details
    Browse the repository at this point in the history
  2. fix(v3): strip embedded user/password from urls

    The username and password authentication are passed through other
    arguments.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    b6090f5 View commit details
    Browse the repository at this point in the history
  3. chore(tests): update log formatting

    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    7417ab8 View commit details
    Browse the repository at this point in the history
  4. refactor(tests): move parse_headers/matching_rules out of class

    These functions do not really belong to the class, and there's now a
    need for them to be called directly.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d24d4cd View commit details
    Browse the repository at this point in the history
  5. chore(test): add state to interaction definition

    Required for the provider state callbacks.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    55e63ad View commit details
    Browse the repository at this point in the history
  6. chore(test): adapt InteractionDefinition for provider

    This introduces a few important changes to the interaction definition:
    
    - Addition of `response_headers`
    - Support for the response status code through either the `response` or
      `status` kwargs
    - Combining the response content type and body to reflect the same logic
      as with the request body and content type.
    - A new `add_to_flask` method (akin to `add_to_pact`) which defines the
      interaction for a Flask app.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    1f5c454 View commit details
    Browse the repository at this point in the history
  7. chore(test): add serialize function

    This is a utility function which is required in order to pass certain
    arguments between the test suite, and the Flask app running in a
    separate process.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    740e03c View commit details
    Browse the repository at this point in the history
  8. chore(test): add provider utilities

    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    9b35d3b View commit details
    Browse the repository at this point in the history
  9. chore(tests): add v1 provider compatibility suite

    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    c2a6303 View commit details
    Browse the repository at this point in the history
  10. chore(tests): fixes for lower python versions

    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    8da7d3d View commit details
    Browse the repository at this point in the history
  11. chore(tests): re-enable warning check

    Following recommendations from Ron, making the check a no-op.
    
    Ref: pact-foundation/pact-reference#404
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    388242d View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. chore(tests): improve logging from provider

    As the provider is launched in its own Python process, logging is not
    configured. So instead of using various `logging` methods, directly
    write to `stderr`.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    20d96a0 View commit details
    Browse the repository at this point in the history
  2. chore(test): strip authentication from url

    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    63b30f9 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. chore(tests): use long-lived pact broker

    The initial implementation of the compatibility suite spun up and down
    the Pact Broker for each scenario, which also resulting in flaky tests
    in CI.
    
    This refactor uses a session pytest fixture which will spin up the
    broker once, and keep re-using it. Functionality to 'reset' the broker
    between tests has also been added.
    
    Signed-off-by: JP-Ellis <[email protected]>
    JP-Ellis committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    edcf260 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5addbc1 View commit details
    Browse the repository at this point in the history