Skip to content

Add test that uses the host's fallback RID#82076

Merged
elinor-fung merged 1 commit intodotnet:mainfrom
elinor-fung:unknown-rid-test
Feb 21, 2023
Merged

Add test that uses the host's fallback RID#82076
elinor-fung merged 1 commit intodotnet:mainfrom
elinor-fung:unknown-rid-test

Conversation

@elinor-fung
Copy link
Member

Add test that explicitly sets the RID to an unknown value (one not in the graph). In that case, the host uses the FALLBACK_HOST_RID defined at compile-time when resolving assets.

@ghost ghost added the area-Host label Feb 14, 2023
@ghost ghost assigned elinor-fung Feb 14, 2023
@ghost
Copy link

ghost commented Feb 14, 2023

Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov
See info in area-owners.md if you want to be subscribed.

Issue Details

Add test that explicitly sets the RID to an unknown value (one not in the graph). In that case, the host uses the FALLBACK_HOST_RID defined at compile-time when resolving assets.

Author: elinor-fung
Assignees: -
Labels:

area-Host

Milestone: -

@am11
Copy link
Member

am11 commented Feb 14, 2023

@elinor-fung, seems like these tests will end up using .RuntimeId(rid) from

which sets DOTNET_RUNTIME_ID environment variable and the RID selection then takes certain shortcut when this variable is set. If the intention behind these tests is not to take short-circuit path, and test the most common scenarios (before anything else), then .RuntimeId() is something to watch out for.

Perhaps, for equal coverage Theory tests based on DOTNET_RUNTIME_ID (set or not) might be useful here?

@elinor-fung
Copy link
Member Author

I was going for using RuntimeId / DOTNET_RUNTIME_ID as a way to explicitly make it so that the computed RID would be unknown so that we hit the compile-time fallbacks.

Agreed that we should have some targeted coverage for the normal path. I'd rather add that in a separate change, since that will involve some reworking of how the tests get set up (these tests use a minimal .deps.json that probably won't include the computed RID in its RID graph in most cases).

@elinor-fung elinor-fung merged commit 1a321fd into dotnet:main Feb 21, 2023
@elinor-fung elinor-fung deleted the unknown-rid-test branch February 21, 2023 16:49
@ghost ghost locked as resolved and limited conversation to collaborators Mar 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants