Skip to content

Remove references to private validator functions#44

Merged
ljtucker merged 3 commits intomainfrom
validator-private-functions
Mar 5, 2026
Merged

Remove references to private validator functions#44
ljtucker merged 3 commits intomainfrom
validator-private-functions

Conversation

@ljtucker
Copy link
Copy Markdown
Contributor

@ljtucker ljtucker commented Mar 5, 2026

Summary

Updated the reference resolution test to use the public validator service functions, rather than calling the private functions directly. Should result in no change in behavior

For proof see the following two screenshots of a validation test (2.11.10) performing identically in both production and locally (after changes):

  • NOTE: Most of the tests in this kit fail on a "Unknown code in value set" error when running locally, before and after my changes. Screenshot of local run before changes added as proof

Local run before changes:
image

Local run after changes:
image

Production run:
image

Copy link
Copy Markdown
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to get the validator, you can use the resource_is_valid? DSL method directly

resource_is_valid?(resource:, profile_url: target_profile, add_messages_to_runnable: false)

See the US Core version: https://github.com/inferno-framework/us-core-test-kit/blob/main/lib/us_core_test_kit/reference_resolution_test.rb#L170

Copy link
Copy Markdown
Contributor

@karlnaden karlnaden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ran the tests and confirmed that it works after the update

Comment thread lib/ipa_test_kit/reference_resolution_test.rb Outdated
Co-authored-by: Karl Naden <86612928+karlnaden@users.noreply.github.com>
@ljtucker ljtucker merged commit 0feb1d6 into main Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants