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

API-42610-check-definitions-healthchecks #20232

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,28 @@ def full_path
:key
)

##
# BenefitClaimService
#
module BenefitClaimServiceBean
DEFINITION =
Bean.new(
path: 'BenefitClaimServiceBean',
namespaces: Namespaces.new(
target: 'http://services.share.benefits.vba.va.gov/',
data: nil
)
)
end

module BenefitClaimWebService
DEFINITION =
Service.new(
bean: BenefitClaimServiceBean::DEFINITION,
path: 'BenefitClaimWebService'
)
end

##
# ClaimantServiceBean
#
Expand All @@ -61,6 +83,28 @@ module ClaimantServiceBean
)
end

##
# ClaimManagementService
#
module ClaimManagementServiceBean
DEFINITION =
Bean.new(
path: 'ClaimManagementServiceBean',
namespaces: Namespaces.new(
target: 'http://services.mapd.benefits.vba.va.gov/',
data: nil
)
)
end

module ClaimManagementService
DEFINITION =
Service.new(
bean: ClaimManagementServiceBean::DEFINITION,
path: 'ClaimManagementService'
)
end

##
# ContentionServiceBean
#
Expand Down
16 changes: 8 additions & 8 deletions modules/claims_api/config/initializers/okcomputer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,28 +146,28 @@ def faraday_client

services = [
{ name: 'benefit_claim_service', endpoint: 'BenefitClaimServiceBean/BenefitClaimWebService' },
{ name: 'claimant_web_service', endpoint: 'ClaimManagementService/ClaimManagementService' },
{ name: 'claim_management_service', endpoint: 'ClaimantServiceBean/ClaimantWebService' },
{ name: 'claimant_web_service', endpoint: 'ClaimantServiceBean/ClaimantWebService' },
{ name: 'claim_management_service', endpoint: 'ClaimManagementService/ClaimManagementService' },
{ name: 'contention_service', endpoint: 'ContentionService/ContentionService' },
{ name: 'corporate_update_web_service', endpoint: 'CorporateUpdateServiceBean/CorporateUpdateService' },
{ name: 'e_benefits_bnft_claim_status_web_service',
endpoint: 'EBenefitsBnftClaimStatusWebServiceBean/EBenefitsBnftClaimStatusWebService' },
{ name: 'intent_to_file_web_service', endpoint: 'IntentToFileWebServiceBean/IntentToFileWebService' },
{ name: 'manage_representative_service', endpoint: 'VDC/ManageRepresentativeService' },
{ name: 'org_web_service', endpoint: 'OrgWebServiceBean/OrgWebService' },
{ name: 'person_web_service', endpoint: 'PersonWebServiceBean/PersonWebService' },
{ name: 'standard_data_service', endpoint: 'StandardDataService/StandardDataService' },
{ name: 'standard_data_web_service', endpoint: 'StandardDataWebServiceBean/StandardDataWebService' },
{ name: 'tracked_item_service', endpoint: 'TrackedItemService/TrackedItemService' },
{ name: 'vdc_manage_representative_service', endpoint: 'VDC/ManageRepresentativeService' },
{ name: 'vdc_veteran_representative_service', endpoint: 'VDC/VeteranRepresentativeService' },
{ name: 'vet_record_web_service', endpoint: 'VetRecordServiceBean/VetRecordWebService' },
{ name: 'veteran_representative_service', endpoint: 'VDC/VeteranRepresentativeService' },
{ name: 'vnp_atchms_service', endpoint: 'VnpAtchmsWebServiceBean/VnpAtchmsService' },
{ name: 'vnp_person_service', endpoint: 'VnpPersonWebServiceBean/VnpPersonService' },
{ name: 'vnp_proc_form_service', endpoint: 'VnpProcFormWebServiceBean/VnpProcFormService' },
{ name: 'vnp_proc_service_v2', endpoint: 'VnpProcWebServiceBeanV2/VnpProcServiceV2' },
{ name: 'vnp_ptcpnt_addrs_service', endpoint: 'VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService' },
{ name: 'vnp_ptcpnt_phone_service', endpoint: 'VnpPtcpntPhoneWebServiceBean/VnpPtcpntPhoneService' },
{ name: 'vnp_ptcpnt_service', endpoint: 'VnpPtcpntWebServiceBean/VnpPtcpntService' },
{ name: 'org_web_service', endpoint: 'OrgWebServiceBean/OrgWebService' },
{ name: 'standard_data_web_service', endpoint: 'StandardDataWebServiceBean/StandardDataWebService' },
{ name: 'tracked_item_service', endpoint: 'TrackedItemService/TrackedItemService' }
{ name: 'vnp_ptcpnt_service', endpoint: 'VnpPtcpntWebServiceBean/VnpPtcpntService' }
]
services.each do |service|
OkComputer::Registry.register service[:name], FaradayBGSCheck.new(service[:endpoint])
Expand Down
32 changes: 22 additions & 10 deletions modules/claims_api/spec/requests/metadata_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@
expect(result['benefit_claim_service']['success']).to eq(false)
end

it 'returns the correct status when the e-benefits-bnft-claim-status-web-service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['e_benefits_bnft_claim_status_web_service']['success']).to eq(false)
end

it 'returns the correct status when the claimant service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
Expand All @@ -91,16 +85,16 @@
expect(result['corporate_update_web_service']['success']).to eq(false)
end

it 'returns the correct status when the intenttofile is not healthy' do
it 'returns the correct status when the e-benefits-bnft-claim-status-web-service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['intent_to_file_web_service']['success']).to eq(false)
expect(result['e_benefits_bnft_claim_status_web_service']['success']).to eq(false)
end

it 'returns the correct status when the manage rep service is not healthy' do
it 'returns the correct status when the intenttofile is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['manage_representative_service']['success']).to eq(false)
expect(result['intent_to_file_web_service']['success']).to eq(false)
end

it 'returns the correct status when bgs org service is not healthy' do
Expand All @@ -116,6 +110,12 @@
end

it 'returns the correct status when the bgs standard_data_service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['standard_data_service']['success']).to eq(false)
end

it 'returns the correct status when the bgs standard_data_web_service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['standard_data_web_service']['success']).to eq(false)
Expand All @@ -127,6 +127,18 @@
expect(result['tracked_item_service']['success']).to eq(false)
end

it 'returns the correct status when the manage rep service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['vdc_manage_representative_service']['success']).to eq(false)
end

it 'returns the correct status when the vet rep service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
expect(result['vdc_veteran_representative_service']['success']).to eq(false)
end

it 'returns the correct status when the bgs vet_record service is not healthy' do
get "/services/claims/#{version}/upstream_healthcheck"
result = JSON.parse(response.body)
Expand Down
Loading