Skip to content

Commit

Permalink
Add Support API mock service
Browse files Browse the repository at this point in the history
This will be used to run Pact tests against Support API.
  • Loading branch information
deborahchua committed May 29, 2024
1 parent 64c1829 commit 61e46ec
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/support/pact_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
LOCATIONS_API_PORT = 3008
ASSET_MANAGER_API_PORT = 3009
EMAIL_ALERT_API_PORT = 3010
SUPPORT_API_PORT = 3011

def publishing_api_host
"http://localhost:#{PUBLISHING_API_PORT}"
Expand Down Expand Up @@ -46,6 +47,10 @@ def email_alert_api_host
"http://localhost:#{EMAIL_ALERT_API_PORT}"
end

def support_api_host
"http://localhost:#{SUPPORT_API_PORT}"
end

Pact.service_consumer "GDS API Adapters" do
has_pact_with "Publishing API" do
mock_service :publishing_api do
Expand Down Expand Up @@ -100,4 +105,10 @@ def email_alert_api_host
port EMAIL_ALERT_API_PORT
end
end

has_pact_with "Support API" do
mock_service :support_api do
port SUPPORT_API_PORT
end
end
end

0 comments on commit 61e46ec

Please sign in to comment.