Skip to content

Commit

Permalink
revert: restore faraday version to 2.12 (#20228)
Browse files Browse the repository at this point in the history
Original PR: #19978
Revert PR: #20141

This reverts a previous commit that downgraded the Faraday gem to
version 2.10 due to test failures. We believe that was a false alarm and
was actually just flaky tests.
  • Loading branch information
ericboehs authored Jan 10, 2025
1 parent a91cb23 commit 4f29626
Show file tree
Hide file tree
Showing 9 changed files with 70 additions and 29 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1308,6 +1308,7 @@ spec/fixtures/fhir @department-of-veterans-affairs/vfs-vaos @department-of-veter
spec/fixtures/files @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/hca @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/form1010_ezr @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/fixtures/iam_ssoe @department-of-veterans-affairs/octo-identity
spec/fixtures/identity_dashboard @department-of-veterans-affairs/octo-identity
spec/fixtures/idme @department-of-veterans-affairs/octo-identity
spec/fixtures/json/detailed_schema_errors_schema.json @department-of-veterans-affairs/lighthouse-banana-peels @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ gem 'dogstatsd-ruby'
gem 'dry-struct'
gem 'dry-types'
gem 'ethon', '>=0.13.0'
gem 'faraday', '~> 2.10'
gem 'faraday', '~> 2.12'
gem 'faraday-follow_redirects'
gem 'faraday-httpclient'
gem 'faraday-multipart'
Expand Down
13 changes: 7 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,9 @@ GEM
railties (>= 5.0.0)
faker (3.5.1)
i18n (>= 1.8.11, < 2)
faraday (2.10.1)
faraday-net_http (>= 2.0, < 3.2)
faraday (2.12.2)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-follow_redirects (0.3.0)
faraday (>= 1, < 3)
Expand All @@ -446,8 +447,8 @@ GEM
httpclient (>= 2.2)
faraday-multipart (1.1.0)
multipart-post (~> 2.0)
faraday-net_http (3.1.1)
net-http
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
faraday-retry (2.2.1)
faraday (~> 2.0)
faraday-typhoeus (1.1.0)
Expand Down Expand Up @@ -648,7 +649,7 @@ GEM
ffi-compiler (~> 1.0)
rake (~> 13.0)
lockbox (2.0.1)
logger (1.6.4)
logger (1.6.5)
loofah (2.23.1)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -1198,7 +1199,7 @@ DEPENDENCIES
facilities_api!
factory_bot_rails
faker
faraday (~> 2.10)
faraday (~> 2.12)
faraday-follow_redirects
faraday-httpclient
faraday-multipart
Expand Down
4 changes: 2 additions & 2 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -813,8 +813,8 @@ sentry:
dsn: ~

iam_ssoe:
client_cert_path: ~
client_key_path: ~
client_cert_path: spec/fixtures/iam_ssoe/oauth.crt
client_key_path: spec/fixtures/iam_ssoe/oauth.key
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"
Expand Down
8 changes: 0 additions & 8 deletions modules/mobile/spec/support/helpers/iam_session_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ def iam_headers_no_camel(additional_headers = nil)
headers
end

def stub_iam_certs
allow(IAMSSOeOAuth::Configuration.instance).to receive_messages(
ssl_cert: instance_double(OPENSSL_X509_CERTIFICATE), ssl_key: instance_double(OPENSSL_PKEY_RSA)
)
end

def iam_sign_in(iam_user = FactoryBot.build(:iam_user), access_token = nil)
token = access_token || DEFAULT_ACCESS_TOKEN
IAMUser.create(iam_user)
Expand All @@ -42,11 +36,9 @@ def iam_sign_in(iam_user = FactoryBot.build(:iam_user), access_token = nil)

config.before :each, type: :request do
Flipper.enable('va_online_scheduling')
stub_iam_certs
end

config.before :each, type: :controller do
Flipper.enable('va_online_scheduling')
stub_iam_certs
end
end
31 changes: 31 additions & 0 deletions spec/fixtures/iam_ssoe/oauth.crt
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
-----BEGIN CERTIFICATE-----
MIIFUzCCBDugAwIBAgIHPQAAAACD1zANBgkqhkiG9w0BAQsFADBIMRMwEQYKCZIm
iZPyLGQBGRYDZ292MRIwEAYKCZImiZPyLGQBGRYCdmExHTAbBgNVBAMTFFZBLUlu
dGVybmFsLVMyLUlDQTExMB4XDTI0MDIyMzE4NDA1NloXDTI1MDMxODE4NDA1Nlow
gYkxCzAJBgNVBAYTAlVTMQ0wCwYDVQQIEwRELkMuMRMwEQYDVQQHEwpXYXNoaW5n
dG9uMSwwKgYDVQQKEyNVLlMuIERlcGFydG1lbnQgb2YgVmV0ZXJhbnMgQWZmYWly
czEoMCYGA1UEAxMfc2lnbi1pbi1zZXJ2aWNlLW9hdXRoLWxvY2FsaG9zdDCCASIw
DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALrqKT1swpRHqXuXzhSLxB+9AzTG
nmqYOjhN+/3z/4fslO+yKwWIYOSA+HQhYkD3KqtnElyWOvhfL5YHxi0u6PAjogik
BVazx2CZLgcvHC4wpuWle61zM5GlGnW/+Vvxq+v6iduxgEYC6kkJXMYXXlxtGBhQ
ucRUcnBZ/IWlleTgRVbQe9GQBIpxIsDCpd8TxFvqnw/mnWAUC6gwf52Pf9xZuRXy
jVFATvU2Y+YTzXEIWRaEQ3jW/EQlgPKLqHbQMauO5jh/N4pqTzXW4Rmu8GbHUDgX
8+y/67nuZmq0r1pKb67k3TjGj6BGMtadLOBSGVyELPbj/MpvADvr2iUTcvkCAwEA
AaOCAf4wggH6MFIGA1UdEQRL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additions & 0 deletions spec/fixtures/iam_ssoe/oauth.key
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC66ik9bMKUR6l7
l84Ui8QfvQM0xp5qmDo4Tfv98/+H7JTvsisFiGDkgPh0IWJA9yqrZxJcljr4Xy+W
B8YtLujwI6IIpAVWs8dgmS4HLxwuMKblpXutczORpRp1v/lb8avr+onbsYBGAupJ
CVzGF15cbRgYULnEVHJwWfyFpZXk4EVW0HvRkASKcSLAwqXfE8Rb6p8P5p1gFAuo
MH+dj3/cWbkV8o1RQE71NmPmE81xCFkWhEN41vxEJYDyi6h20DGrjuY4fzeKak81
1uEZrvBmx1A4F/Psv+u57mZqtK9aSm+u5N04xo+gRjLWnSzgUhlchCz24/zKbwA7
69olE3L5AgMBAAECggEABiEJiycW1k/nQdM/gbL3kmbbRQ7CQRKOzivYeIJYvbdH
RvjbqknHi5ajDwPNOf4g2w/9LSYL9vsAD3ZfzDl+j+lLNedS+X3ZqtQ7CydDUExu
HJepj414gm0cigHqhlZNYeaMQLT4VNNhpVV2QlSf1n4JTTrQbJysR/zbZ/J/EMsv
gV2K7CBaHzPQbdKsOve9eRywN9e2udcUxSNkfu5k+NBtaTUEOmXivK+2x7wLNt24
/A3T7mXgYMwlxkTJa9G8Rv2SJTPFuxfSnPzYQJlJUxIMR6HxNa9NZu+tT3taGfHd
BmXnIFZrGZfL3wjzXnm+qHLxSkZ6ESMLP06fR8BydQKBgQDVyjXj234+H28SDWZc
FsbAaHAB90Yjjj1LvPvZK90eL/4ESsztbdvxyQfWOyGggdajuCVEsh1gM5+CUYux
kqXsBX5TdMCP6WCeHv4g3r2A4Umyx565BwKpwYtS7YcF4QxS9iaBGlCTUHOeYA3p
r+zZoyKsd1/IpMDwBGAXSX91awKBgQDf0ZJW9VJuMwbfyI17BiFc9Ignk1V6d+we
mN7sc38rU8z3qpMq+iGjROf5x60Wya1g0P3o8xAAhqIKQOsJC5Ovs+a+grZS8nQb
A5zr5XdXamene+IUOeZYdN0H6jfWWTPAfNUM30J4rVki1noCkoqE6ayU9jFe9YpH
r/8+G5SuKwKBgDAIEjtzINXMMiQYJpsh8t1fmWqXp4Zteo/9kYelNzSFC8jjFU9y
kyurQrt65X8uLI7z3EumyLrIXlnlAEGQ9P4l7c/KN0kd4bsks2unH2RJOUmVV6+y
R4LkHO0wuFk1ypMJAnWW9+tg89jtM7MA93GeGTguSbLGcSJ7mSsiNCSpAoGBAJ1/
FrA0XzYGmC6/LLfGX5HOzUS0C7FrU+9P+YZ/25v8kz4wfPEAJM2EPozo8qcXcfav
+gyDhd4o3zvB5OJvkBRSzut+hZgm3obn6vOgfHM6AAi+Rx+egrX6PlNEgNhH2v/3
l+A/9sF+kjvOmvrWbb0LxhLoj2NX+19ovH7S37QTAoGACgoDoXhJPzzAceerv4zs
y02Qw7ze6zFD+Lpky5mTKw9GlY5fZW3b6aHeje+KjFcGpZeKirlJumQh1l9fIwS/
hA+wQ1jAvkDffTYrkkTCMhA6gJhd4LJpApXg5U0XO5uhlibMZEOIlTmXzLW30wB2
/ZtxYyyRdgfjyjauRWdgmUQ=
-----END PRIVATE KEY-----
6 changes: 0 additions & 6 deletions spec/lib/iam_ssoe_oauth/service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
describe 'IAMSSOeOAuth::Service' do
let(:service) { IAMSSOeOAuth::Service.new }

before do
allow(IAMSSOeOAuth::Configuration.instance).to receive_messages(
ssl_cert: instance_double('OpenSSL::X509::Certificate'), ssl_key: instance_double('OpenSSL::PKey::RSA')
)
end

describe '#post_introspect' do
context 'with an active user response' do
let(:response) do
Expand Down
6 changes: 0 additions & 6 deletions spec/lib/iam_ssoe_oauth/session_manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@
let(:access_token) { 'ypXeAwQedpmAy5xFD2u5' }
let(:session_manager) { IAMSSOeOAuth::SessionManager.new(access_token) }

before do
allow(IAMSSOeOAuth::Configuration.instance).to receive_messages(
ssl_cert: instance_double('OpenSSL::X509::Certificate'), ssl_key: instance_double('OpenSSL::PKey::RSA')
)
end

describe '#find_or_create_user' do
context 'with a valid access token' do
before do
Expand Down

0 comments on commit 4f29626

Please sign in to comment.