From 4bd7ea72bbe8963dba2e8136c4dae9b04b8fcc75 Mon Sep 17 00:00:00 2001 From: KirillKornakov Date: Thu, 19 Jun 2025 10:47:10 +0300 Subject: [PATCH 1/3] test --- consumer/test_contract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumer/test_contract.py b/consumer/test_contract.py index acedb94..78ff7ca 100644 --- a/consumer/test_contract.py +++ b/consumer/test_contract.py @@ -10,13 +10,13 @@ def test_get_user(): - expected = {"id": 1, "name": "John Doe"} + expected = {"id": 1, "name": "John Doe", "title": "head"} # Define the interaction ( pact.upon_receiving("a request for user with ID 1") .given("User with ID 2 exists") - .with_request("GET", "/users/1") + .with_request("GET", "/users/2") .will_respond_with(200, body=expected) ) From 208ac2fce24b477e134064c0b69abb98900ceea0 Mon Sep 17 00:00:00 2001 From: kornakov <38846896+kornakov@users.noreply.github.com> Date: Thu, 19 Jun 2025 10:49:54 +0300 Subject: [PATCH 2/3] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e5d186..9693bc1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,8 @@ name: Test and Publish on: push: branches: [ main ] + pull_request: + branches: [ main ] workflow_dispatch: jobs: From 16e884d34aa4f3bf3ed80f9722eac25818e3ace2 Mon Sep 17 00:00:00 2001 From: KirillKornakov Date: Thu, 19 Jun 2025 11:13:17 +0300 Subject: [PATCH 3/3] fix contract --- consumer/test_contract.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consumer/test_contract.py b/consumer/test_contract.py index 78ff7ca..a58177e 100644 --- a/consumer/test_contract.py +++ b/consumer/test_contract.py @@ -15,8 +15,8 @@ def test_get_user(): # Define the interaction ( pact.upon_receiving("a request for user with ID 1") - .given("User with ID 2 exists") - .with_request("GET", "/users/2") + .given("User with ID 1 exists") + .with_request("GET", "/users/1") .will_respond_with(200, body=expected) )