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

Ensure support for external nodes in unit tests #9271

Conversation

QMalcolm
Copy link
Contributor

@QMalcolm QMalcolm commented Dec 12, 2023

resolves #8944

Problem

We weren't sure if external nodes in unit tests would just work, and it turns out that they do!

Note: this wasn't originally working

Before the winter break this didn't just work. I started on this work early in December, and at that time it was failing to find the external node at ref resolution time. This was because under the hood the identifier for refs in unit tests are under a different name to spoof the node to be ref'd. At the time there was a disconnect between the ref in the unit test, and the unit test in the model.

Solution

Added a test which includes an external node

Note

There is no changelog for this PR because nothing in core itself was changed, just an added test.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@QMalcolm QMalcolm added the Skip Changelog Skips GHA to check for changelog file label Dec 12, 2023
@cla-bot cla-bot bot added the cla:yes label Dec 12, 2023
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (56dfb34) 86.88% compared to head (bd7dfda) 85.96%.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           unit_testing_feature_branch    #9271      +/-   ##
===============================================================
- Coverage                        86.88%   85.96%   -0.92%     
===============================================================
  Files                              223      223              
  Lines                            27657    27657              
===============================================================
- Hits                             24029    23775     -254     
- Misses                            3628     3882     +254     
Flag Coverage Δ
integration 82.77% <ø> (-1.13%) ⬇️
unit 64.87% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gshank gshank force-pushed the unit_testing_feature_branch branch 2 times, most recently from 8fbbb65 to 56dfb34 Compare January 2, 2024 22:53
@QMalcolm QMalcolm force-pushed the qmalcolm--8944-unit-test-models-dependent-on-external-nodes branch from 9b844cb to 9aceb28 Compare January 5, 2024 00:13
@QMalcolm QMalcolm force-pushed the qmalcolm--8944-unit-test-models-dependent-on-external-nodes branch from 9aceb28 to bd7dfda Compare January 5, 2024 00:56
@QMalcolm QMalcolm marked this pull request as ready for review January 5, 2024 01:03
@QMalcolm QMalcolm requested a review from a team as a code owner January 5, 2024 01:03
@QMalcolm
Copy link
Contributor Author

QMalcolm commented Jan 5, 2024

I was wrong this doesn't just work. I just forgot that make test doesn't run the integration tests locally, I have to run make integration 🙃 Doing so results in the same failure I was receiving prior to winter break, which means the recent updates the feature branch haven't resolved the issue.

@QMalcolm QMalcolm closed this Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla:yes Skip Changelog Skips GHA to check for changelog file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant