File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,16 @@ public static IResourceBuilder<MinioContainerResource> AddMinioContainer(
3939
4040 var resource = new MinioContainerResource ( name , rootUserParameter , rootPasswordParameter ) ;
4141
42+ const int consoleTargetPort = 9001 ;
4243 var builderWithResource = builder
4344 . AddResource ( resource )
4445 . WithImage ( MinioContainerImageTags . Image , MinioContainerImageTags . Tag )
4546 . WithImageRegistry ( MinioContainerImageTags . Registry )
4647 . WithHttpEndpoint ( targetPort : 9000 , port : port , name : MinioContainerResource . PrimaryEndpointName )
47- . WithHttpEndpoint ( targetPort : 9001 , name : MinioContainerResource . ConsoleEndpointName )
48+ . WithHttpEndpoint ( targetPort : consoleTargetPort , name : MinioContainerResource . ConsoleEndpointName )
4849 . WithEnvironment ( RootUserEnvVarName , resource . RootUser . Value )
4950 . WithEnvironment ( RootPasswordEnvVarName , resource . PasswordParameter . Value )
50- . WithArgs ( "server" , "/data" ) ;
51+ . WithArgs ( "server" , "/data" , "--console-address" , $ ": { consoleTargetPort } " ) ;
5152
5253 var endpoint = builderWithResource . Resource . GetEndpoint ( MinioContainerResource . PrimaryEndpointName ) ;
5354 var healthCheckKey = $ "{ name } _check";
Original file line number Diff line number Diff line change @@ -22,6 +22,18 @@ public async Task ResourceStartsAndRespondsOk()
2222 Assert . Equal ( HttpStatusCode . OK , response . StatusCode ) ;
2323 }
2424
25+ [ Fact ]
26+ public async Task ResourceStartsAndUiRespondsOk ( )
27+ {
28+ var resourceName = "minio" ;
29+ await fixture . ResourceNotificationService . WaitForResourceHealthyAsync ( resourceName ) . WaitAsync ( TimeSpan . FromMinutes ( 5 ) ) ;
30+ var httpClient = fixture . CreateHttpClient ( resourceName , "console" ) ;
31+
32+ var response = await httpClient . GetAsync ( "/" ) ;
33+
34+ Assert . Equal ( HttpStatusCode . OK , response . StatusCode ) ;
35+ }
36+
2537 [ Fact ]
2638 public async Task ApiServiceCreateData ( )
2739 {
You can’t perform that action at this time.
0 commit comments