Fix wiring up of uuid_prefix and request_ip for TMX#6851
Conversation
And a few other fixes: - updating the mock proofer to be more realistic - update plumbing - remove uuid_prefix as a job argument since it's already inside applicant_pii changelog: Internal, Bug fixes, Updates data sent to vendors
|
|
||
| def perform(result_id:, encrypted_arguments:, trace_id:, should_proof_state_id:, | ||
| dob_year_only:, user_id: nil, threatmetrix_session_id: nil, | ||
| uuid_prefix: nil, request_ip: nil) |
There was a problem hiding this comment.
this is set here
and lives inapplicant_pii already.
Additionally, it was never set in idv/agents.rb so it is safe to remove this argument here
| ddp_pii[:input_ip_address] = request_ip | ||
| ddp_pii[:local_attrib_1] = uuid_prefix | ||
| ddp_pii[:request_ip] = request_ip |
There was a problem hiding this comment.
the DDP proofer reads :uuid_prefix and :request_ip from the applicant:
| double( | ||
| 'request', | ||
| remote_ip: Faker::Internet.ip_v4_address, | ||
| headers: { 'X-Amzn-Trace-Id' => amzn_trace_id }, |
There was a problem hiding this comment.
just one spec failing on trace_id
There was a problem hiding this comment.
huh, this spec passes for me
There was a problem hiding this comment.
spec/services/idv/steps/verify_step_spec.rb worked, but its cousin in features spec/features/idv/doc_auth/verify_step_spec.rb was failing, fixed in 9e4acce
| double( | ||
| 'request', | ||
| remote_ip: Faker::Internet.ip_v4_address, | ||
| headers: { 'X-Amzn-Trace-Id' => amzn_trace_id }, |
There was a problem hiding this comment.
huh, this spec passes for me
|
|
||
| def attributes | ||
| required_attributes.concat optional_attributes | ||
| [*required_attributes, *optional_attributes] |
There was a problem hiding this comment.
.concat is a mutation (same as +=) and this was causing some test flakes because it was modifying the required attributes array, and the new specs that read these accessors were sometimes seeing extra attributes
And a few other fixes:
inside applicant_pii
changelog: Internal, Bug fixes, Updates data sent to vendors