@@ -35,7 +35,7 @@ public async Task TestEndpointsReturnOk(TestEndpoints testEndpoints)
35
35
{
36
36
var appHostType = testEndpoints . AppHostType ! ;
37
37
var resourceEndpoints = testEndpoints . ResourceEndpoints ! ;
38
- var appHost = await DistributedApplicationTestFactory . CreateAsync ( appHostType , _testOutput ) ;
38
+ var appHost = await DistributedApplicationTestFactory . CreateAsync ( appHostType , _testOutput , testEndpoints . EnableParameterRandomisation ) ;
39
39
var projects = appHost . Resources . OfType < ProjectResource > ( ) ;
40
40
await using var app = await appHost . BuildAsync ( ) ;
41
41
@@ -144,6 +144,7 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
144
144
// whenReady: TestEventHubsAppHost),
145
145
new TestEndpoints ( typeof ( Projects . Redis_AppHost ) ,
146
146
resourceEndpoints : new ( ) { { "apiservice" , [ "/alive" , "/health" , "/garnet/ping" , "/garnet/get" , "/garnet/set" , "/redis/ping" , "/redis/get" , "/redis/set" , "/valkey/ping" , "/valkey/get" , "/valkey/set" ] } } ,
147
+ enableParameterRandomisation : true ,
147
148
waitForTexts : [
148
149
new ( "redis" , "Ready to accept connections tcp" ) ,
149
150
new ( "valkey" , "Ready to accept connections tcp" ) ,
@@ -152,11 +153,13 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
152
153
] ) ,
153
154
new TestEndpoints ( typeof ( Projects . AzureStorageEndToEnd_AppHost ) ,
154
155
resourceEndpoints : new ( ) { { "api" , [ "/alive" , "/health" , "/" ] } } ,
156
+ enableParameterRandomisation : true ,
155
157
waitForTexts : [
156
158
new ( "storage" , "Azurite Table service is successfully listening" )
157
159
] ) ,
158
160
new TestEndpoints ( typeof ( Projects . MilvusPlayground_AppHost ) ,
159
161
resourceEndpoints : new ( ) { { "apiservice" , [ "/alive" , "/health" , "/create" , "/search" ] } } ,
162
+ enableParameterRandomisation : true ,
160
163
waitForTexts : [
161
164
new ( "milvus" , "Milvus Proxy successfully initialized and ready to serve" ) ,
162
165
] ) ,
@@ -166,19 +169,22 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
166
169
// // "/ef" - disabled due to https://github.com/dotnet/aspire/issues/5415
167
170
// waitForTexts: [
168
171
// new ("cosmos", "Started$"),
169
- // new ("api", "Application started")
172
+ // new("api", "Application started")
170
173
// ]),
171
174
new TestEndpoints ( typeof ( Projects . Keycloak_AppHost ) ,
172
- resourceEndpoints : new ( ) { { "apiservice" , [ "/alive" , "/health" ] } } ) ,
175
+ resourceEndpoints : new ( ) { { "apiservice" , [ "/alive" , "/health" ] } } ,
176
+ enableParameterRandomisation : true ) ,
173
177
new TestEndpoints ( typeof ( Projects . Mongo_AppHost ) ,
174
178
resourceEndpoints : new ( ) { { "api" , [ "/alive" , "/health" , "/" ] } } ,
179
+ enableParameterRandomisation : true ,
175
180
waitForTexts : [
176
181
new ( "mongo" , "Waiting for connections" ) ,
177
182
new ( "mongo-mongoexpress" , "Mongo Express server listening" ) ,
178
183
new ( "api" , "Application started." )
179
184
] ) ,
180
185
new TestEndpoints ( typeof ( Projects . MySqlDb_AppHost ) ,
181
186
resourceEndpoints : new ( ) { { "apiservice" , [ "/alive" , "/health" , "/catalog" ] } } ,
187
+ enableParameterRandomisation : true ,
182
188
waitForTexts : [
183
189
new ( "mysql" , "ready for connections.* port: 33060" ) ,
184
190
new ( "apiservice" , "Application started" )
@@ -188,12 +194,14 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
188
194
{ "api" , [ "/alive" , "/health" ] } ,
189
195
{ "backend" , [ "/alive" , "/health" ] }
190
196
} ,
197
+ enableParameterRandomisation : true ,
191
198
waitForTexts : [
192
199
new ( "nats" , "Server is ready" ) ,
193
200
new ( "api" , "Application started" )
194
201
] ) ,
195
202
new TestEndpoints ( typeof ( Projects . ParameterEndToEnd_AppHost ) ,
196
203
resourceEndpoints : new ( ) { { "api" , [ "/" , "/alive" , "/health" ] } } ,
204
+ enableParameterRandomisation : false ,
197
205
waitForTexts : [
198
206
new ( "sql" , "SQL Server is now ready for client connections." ) ,
199
207
] ) ,
@@ -202,6 +210,7 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
202
210
// Invoking "/" first as that *creates* the databases
203
211
{ "api" , [ "/" , "/alive" , "/health" ] }
204
212
} ,
213
+ enableParameterRandomisation : true ,
205
214
waitForTexts : [
206
215
new ( "pg1" , "PostgreSQL init process complete; ready for start up" ) ,
207
216
new ( "pg2" , "PostgreSQL init process complete; ready for start up" ) ,
@@ -213,26 +222,30 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
213
222
] ) ,
214
223
new TestEndpoints ( typeof ( Projects . ProxylessEndToEnd_AppHost ) ,
215
224
resourceEndpoints : new ( ) { { "api" , [ "/alive" , "/health" , "/redis" ] } } ,
225
+ enableParameterRandomisation : true ,
216
226
waitForTexts : [
217
227
new ( "redis" , "Ready to accept connections" ) ,
218
228
new ( "api" , "Application started" ) ,
219
229
new ( "api2" , "Application started" )
220
230
] ) ,
221
231
new TestEndpoints ( typeof ( Projects . Qdrant_AppHost ) ,
222
232
resourceEndpoints : new ( ) { { "apiservice" , [ "/alive" , "/health" ] } } ,
233
+ enableParameterRandomisation : true ,
223
234
waitForTexts : [
224
235
new ( "qdrant" , "Qdrant HTTP listening" ) ,
225
236
new ( "apiservice" , "Application started" )
226
237
] ) ,
227
238
new TestEndpoints ( typeof ( Projects . Seq_AppHost ) ,
228
239
resourceEndpoints : new ( ) { { "api" , [ "/alive" , "/health" ] } } ,
240
+ enableParameterRandomisation : true ,
229
241
waitForTexts : [
230
242
new ( "seq" , "Seq listening" ) ,
231
243
new ( "api" , "Application started" )
232
244
] ) ,
233
245
// Invoke "/" first to create the databases
234
246
new TestEndpoints ( typeof ( Projects . SqlServerEndToEnd_AppHost ) ,
235
247
resourceEndpoints : new ( ) { { "api" , [ "/" , "/alive" , "/health" ] } } ,
248
+ enableParameterRandomisation : true ,
236
249
waitForTexts : [
237
250
new ( "sql1" , "SQL Server is now ready for client connections" ) ,
238
251
new ( "sql2" , "SQL Server is now ready for client connections" ) ,
@@ -242,6 +255,7 @@ public static IList<TestEndpoints> GetAllTestEndpoints()
242
255
{ "catalogdbapp" , [ "/alive" , "/health" ] } ,
243
256
{ "frontend" , [ "/alive" , "/health" ] }
244
257
} ,
258
+ enableParameterRandomisation : true ,
245
259
waitForTexts : [
246
260
new ( "messaging" , "started TCP listener" ) ,
247
261
new ( "basketcache" , "Ready to accept connections" ) ,
@@ -279,15 +293,19 @@ public class TestEndpoints
279
293
{
280
294
public TestEndpoints ( Type appHostType ,
281
295
Dictionary < string , List < string > > resourceEndpoints ,
296
+ bool enableParameterRandomisation ,
282
297
List < ReadyStateText > ? waitForTexts = null )
283
298
{
284
299
AppHostType = appHostType ;
285
300
ResourceEndpoints = resourceEndpoints ;
286
301
WaitForTexts = waitForTexts ;
302
+ EnableParameterRandomisation = enableParameterRandomisation ;
287
303
}
288
304
289
305
public Type AppHostType { get ; set ; }
290
306
307
+ public bool EnableParameterRandomisation { get ; set ; }
308
+
291
309
public List < ResourceWait > ? WaitForResources { get ; set ; }
292
310
293
311
public List < ReadyStateText > ? WaitForTexts { get ; set ; }
0 commit comments