Skip to content

Commit

Permalink
Remove Unused Settings - Part 1 (#19096)
Browse files Browse the repository at this point in the history
* remove unused settings

* remove unused settings
  • Loading branch information
stevenjcumming authored Nov 19, 2024
1 parent d6debe9 commit 1a24f7f
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 57 deletions.
21 changes: 0 additions & 21 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ sign_in:

terms_of_use:
current_version: v1
provisioner_cookie_domain: localhost
enabled_clients: vaweb, mhv, myvahealth

lockbox:
master_key: "0d78eaf0e90d4e7b8910c9112e16e66d8b00ec4054a89aa426e32712a13371e9"
previous_master_key: "a798f118b400a1a7552597cc94f44c577919c76b3d26c1eed8ae0703f4240216"

binaries:
# you can specify a full path in settings.local.yml if necessary
Expand All @@ -106,8 +104,6 @@ clamav:
host: 'clamav'
port: '3310'

db_encryption_key: f01ff8ebd1a2b053ad697ae1f0d86adb

database_url: postgis:///vets-api
test_database_url: postgis:///vets-api-test

Expand Down Expand Up @@ -159,19 +155,14 @@ salesforce-gibft:
url: "https://va--rdtcddev.cs33.my.salesforce.com/"

salesforce-carma:
mock: true
url: "https://fake-carma.salesforce.com"
consumer_key: 12345ABC.QQ_1234BBfake
signing_key_path: "spec/fixtures/carma/privatekey.pem" # A dummy private key used for test suite
username: [email protected]

salesforce:
env: dev

form_10_10cg:
carma:
mulesoft:
mock: false
host: ~
client_id: ~
client_secret: ~
Expand Down Expand Up @@ -386,8 +377,6 @@ modules_appeals_api:
enabled: false
weekly_decision_review:
enabled: false
daily_error:
enabled: false
weekly_error:
enabled: false
schema_dir: config/schemas
Expand Down Expand Up @@ -647,12 +636,6 @@ claims_api:
content_type: 'application/vnd.api+json'
report_enabled: false
audit_enabled: false
s3:
enabled: false
aws_access_key_id: ~
aws_secret_access_key: ~
region: ~
bucket: ~
disability_claims_mock_override: false
schema_dir: config/schemas
slack:
Expand Down Expand Up @@ -834,7 +817,6 @@ iam_ssoe:
client_id: "Mobile_App_API_Server_LOWERS"
# oauth (rest) and sts (soap) services are on different hosts
oauth_url: "https://int.fed.eauth.va.gov:444"
sts_url: "https://preprod.services.eauth.va.gov:9301"
timeout: 20

statsd:
Expand Down Expand Up @@ -1637,9 +1619,6 @@ rrd:
alerts:
recipients:
- fake_email
event_tracking:
recipients:
- fake_email
mas_tracking:
recipients:
- fake_email
Expand Down
9 changes: 0 additions & 9 deletions config/settings/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ mvi:
url: http://www.example.com/
mock: false

locators:
providers_enabled: true

reports:
aws:
access_key_id: key
Expand Down Expand Up @@ -277,9 +274,6 @@ rrd:
alerts:
recipients:
- fake_email
event_tracking:
recipients:
- fake_email

sidekiq:
github_organization: "organization"
Expand Down Expand Up @@ -371,7 +365,6 @@ lgy:
form_10_10cg:
carma:
mulesoft:
mock: true
host: "https://fake-mulesoft.vapi.va.gov"
client_id: BEEFCAFE1234
client_secret: C0FFEEFACE4321
Expand All @@ -391,7 +384,6 @@ vha:

mhv:
medical_records:
app_id: 0
app_token: xyz
host: http://example.org

Expand All @@ -401,7 +393,6 @@ evss:

claims_api:
evss_container:
auth_base_name: staging-api.va.gov
client_key: fakekeyvaluehere
pdf_generator_526:
url: 'https://fake_pdf_url.com'
Expand Down
1 change: 1 addition & 0 deletions lib/gibft/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

module Gibft
class Configuration < Salesforce::Configuration
# Settings.salesforce-gibft
SALESFORCE_INSTANCE_URL = Settings['salesforce-gibft'].url

def service_name
Expand Down
1 change: 1 addition & 0 deletions lib/gibft/service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module Gibft
class Service < Salesforce::Service
configuration Gibft::Configuration

# Settings.salesforce-gibft
CONSUMER_KEY = Settings['salesforce-gibft'].consumer_key
SIGNING_KEY_PATH = Settings['salesforce-gibft'].signing_key_path
SALESFORCE_USERNAMES = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@
let(:upload) { create(:higher_level_review_v1, status: 'received') }

it 'ignores them' do
with_settings(Settings.modules_appeals_api, higher_level_review_updater_enabled: true) do
Sidekiq::Testing.inline! { AppealsApi::HigherLevelReviewUploadStatusBatch.new.perform }
upload.reload
expect(upload.status).to eq('received')
end
Sidekiq::Testing.inline! { AppealsApi::HigherLevelReviewUploadStatusBatch.new.perform }
upload.reload
expect(upload.status).to eq('received')
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
in_process_element[0]['uuid'] = upload.id
expect(faraday_response).to receive(:body).at_least(:once).and_return([in_process_element].to_json)

with_settings(Settings.modules_appeals_api, higher_level_review_updater_enabled: true) do
AppealsApi::HigherLevelReviewUploadStatusUpdater.new.perform([upload])
upload.reload
expect(upload.status).to eq('processing')
end
AppealsApi::HigherLevelReviewUploadStatusUpdater.new.perform([upload])
upload.reload
expect(upload.status).to eq('processing')
end

it 'notifies sentry & slack of individual bad records without affecting good records' do
Expand All @@ -51,13 +49,11 @@
expect_any_instance_of(AppealsApi::CentralMailUpdater).to receive(:log_exception_to_sentry).once
expect_any_instance_of(AppealsApi::Slack::Messager).to receive(:notify!).once

with_settings(Settings.modules_appeals_api, higher_level_review_updater_enabled: true) do
AppealsApi::HigherLevelReviewUploadStatusUpdater.new.perform([bad_upload, upload])
upload.reload
bad_upload.reload
expect(upload.status).to eq('processing')
expect(bad_upload.status).to eq('submitting')
end
AppealsApi::HigherLevelReviewUploadStatusUpdater.new.perform([bad_upload, upload])
upload.reload
bad_upload.reload
expect(upload.status).to eq('processing')
expect(bad_upload.status).to eq('submitting')
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
in_process_element[0]['uuid'] = upload.id
expect(faraday_response).to receive(:body).at_least(:once).and_return([in_process_element].to_json)

with_settings(Settings.modules_appeals_api, notice_of_disagreement_updater_enabled: true) do
AppealsApi::NoticeOfDisagreementUploadStatusUpdater.new.perform([upload])
upload.reload
expect(upload.status).to eq('processing')
end
AppealsApi::NoticeOfDisagreementUploadStatusUpdater.new.perform([upload])
upload.reload
expect(upload.status).to eq('processing')
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
in_process_element[0]['uuid'] = upload.id
expect(faraday_response).to receive(:body).at_least(:once).and_return([in_process_element].to_json)

with_settings(Settings.modules_appeals_api, supplemental_claim_updater_enabled: true) do
AppealsApi::SupplementalClaimUploadStatusUpdater.new.perform([upload])
upload.reload
expect(upload.status).to eq('processing')
end
AppealsApi::SupplementalClaimUploadStatusUpdater.new.perform([upload])
upload.reload
expect(upload.status).to eq('processing')
end
end
end

0 comments on commit 1a24f7f

Please sign in to comment.