@@ -9,6 +9,10 @@ namespace Test.Microsoft.NET.Build.Containers.Tasks;
9
9
[ TestClass ]
10
10
public class CreateNewImageTests
11
11
{
12
+ public static string RuntimeGraphFilePath ( ) =>
13
+ // TODO: The DOTNET_ROOT comes from the test host, but we have no idea what the SDK version is.
14
+ Path . Combine ( Environment . GetEnvironmentVariable ( "DOTNET_ROOT" ) , "sdk" , "7.0.100" , "RuntimeIdentifierGraph.json" ) ;
15
+
12
16
[ TestMethod ]
13
17
public void CreateNewImage_Baseline ( )
14
18
{
@@ -53,6 +57,7 @@ public void CreateNewImage_Baseline()
53
57
task . WorkingDirectory = "app/" ;
54
58
task . ContainerRuntimeIdentifier = "linux-arm64" ;
55
59
task . Entrypoint = new TaskItem [ ] { new ( "dotnet" ) , new ( "build" ) } ;
60
+ task . RuntimeIdentifierGraphPath = RuntimeGraphFilePath ( ) ;
56
61
57
62
Assert . IsTrue ( task . Execute ( ) ) ;
58
63
newProjectDir . Delete ( true ) ;
@@ -116,6 +121,7 @@ public void ParseContainerProperties_EndToEnd()
116
121
cni . Entrypoint = new TaskItem [ ] { new ( "ParseContainerProperties_EndToEnd" ) } ;
117
122
cni . ImageTags = pcp . NewContainerTags ;
118
123
cni . ContainerRuntimeIdentifier = "linux-x64" ;
124
+ cni . RuntimeIdentifierGraphPath = RuntimeGraphFilePath ( ) ;
119
125
120
126
Assert . IsTrue ( cni . Execute ( ) ) ;
121
127
newProjectDir . Delete ( true ) ;
@@ -193,6 +199,7 @@ public void Tasks_EndToEnd_With_EnvironmentVariable_Validation()
193
199
cni . ImageTags = pcp . NewContainerTags ;
194
200
cni . ContainerEnvironmentVariables = pcp . NewContainerEnvironmentVariables ;
195
201
cni . ContainerRuntimeIdentifier = "linux-x64" ;
202
+ cni . RuntimeIdentifierGraphPath = RuntimeGraphFilePath ( ) ;
196
203
197
204
Assert . IsTrue ( cni . Execute ( ) ) ;
198
205
0 commit comments