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(
39
39
40
40
var resource = new MinioContainerResource ( name , rootUserParameter , rootPasswordParameter ) ;
41
41
42
+ const int consoleTargetPort = 9001 ;
42
43
var builderWithResource = builder
43
44
. AddResource ( resource )
44
45
. WithImage ( MinioContainerImageTags . Image , MinioContainerImageTags . Tag )
45
46
. WithImageRegistry ( MinioContainerImageTags . Registry )
46
47
. WithHttpEndpoint ( targetPort : 9000 , port : port , name : MinioContainerResource . PrimaryEndpointName )
47
- . WithHttpEndpoint ( targetPort : 9001 , name : MinioContainerResource . ConsoleEndpointName )
48
+ . WithHttpEndpoint ( targetPort : consoleTargetPort , name : MinioContainerResource . ConsoleEndpointName )
48
49
. WithEnvironment ( RootUserEnvVarName , resource . RootUser . Value )
49
50
. WithEnvironment ( RootPasswordEnvVarName , resource . PasswordParameter . Value )
50
- . WithArgs ( "server" , "/data" ) ;
51
+ . WithArgs ( "server" , "/data" , "--console-address" , $ ": { consoleTargetPort } " ) ;
51
52
52
53
var endpoint = builderWithResource . Resource . GetEndpoint ( MinioContainerResource . PrimaryEndpointName ) ;
53
54
var healthCheckKey = $ "{ name } _check";
Original file line number Diff line number Diff line change @@ -22,6 +22,18 @@ public async Task ResourceStartsAndRespondsOk()
22
22
Assert . Equal ( HttpStatusCode . OK , response . StatusCode ) ;
23
23
}
24
24
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
+
25
37
[ Fact ]
26
38
public async Task ApiServiceCreateData ( )
27
39
{
You can’t perform that action at this time.
0 commit comments