File tree Expand file tree Collapse file tree 3 files changed +16
-7
lines changed
Aspire.Hosting.Azure.EventHubs
Aspire.Hosting.Azure.ServiceBus
tests/Aspire.Hosting.Azure.Tests Expand file tree Collapse file tree 3 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -323,13 +323,13 @@ public static IResourceBuilder<AzureEventHubsResource> RunAsEmulator(this IResou
323
323
var configJsonPath = aspireStore . GetFileNameWithContent ( $ "{ builder . Resource . Name } -Config.json", tempConfigFile ) ;
324
324
325
325
// The docker container runs as a non-root user, so we need to grant other user's read/write permission
326
- // if (!OperatingSystem.IsWindows())
327
- // {
328
- // var mode = UnixFileMode.UserRead | UnixFileMode.UserWrite | UnixFileMode.UserExecute |
329
- // UnixFileMode.OtherRead | UnixFileMode.OtherWrite | UnixFileMode.OtherExecute;
326
+ if ( ! OperatingSystem . IsWindows ( ) )
327
+ {
328
+ var mode = UnixFileMode . UserRead | UnixFileMode . UserWrite | UnixFileMode . UserExecute |
329
+ UnixFileMode . OtherRead | UnixFileMode . OtherWrite | UnixFileMode . OtherExecute ;
330
330
331
- // File.SetUnixFileMode(configJsonPath, mode);
332
- // }
331
+ File . SetUnixFileMode ( configJsonPath , mode ) ;
332
+ }
333
333
334
334
builder . WithAnnotation ( new ContainerMountAnnotation (
335
335
configJsonPath ,
Original file line number Diff line number Diff line change @@ -423,6 +423,15 @@ public static IResourceBuilder<AzureServiceBusResource> RunAsEmulator(this IReso
423
423
// Deterministic file path for the configuration file based on its content
424
424
var configJsonPath = aspireStore . GetFileNameWithContent ( $ "{ builder . Resource . Name } -Config.json", tempConfigFile ) ;
425
425
426
+ // The docker container runs as a non-root user, so we need to grant other user's read/write permission
427
+ if ( ! OperatingSystem . IsWindows ( ) )
428
+ {
429
+ var mode = UnixFileMode . UserRead | UnixFileMode . UserWrite | UnixFileMode . UserExecute |
430
+ UnixFileMode . OtherRead | UnixFileMode . OtherWrite | UnixFileMode . OtherExecute ;
431
+
432
+ File . SetUnixFileMode ( configJsonPath , mode ) ;
433
+ }
434
+
426
435
builder . WithAnnotation ( new ContainerMountAnnotation (
427
436
configJsonPath ,
428
437
AzureServiceBusEmulatorResource . EmulatorConfigJsonPath ,
Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ public async Task VerifyWaitForOnServiceBusEmulatorBlocksDependentResources()
215
215
await app . StopAsync ( ) ;
216
216
}
217
217
218
- [ Fact ( Skip = "Azure ServiceBus emulator is not reliable in CI - https://github.com/dotnet/aspire/issues/7066" ) ]
218
+ [ Fact ]
219
219
[ RequiresDocker ]
220
220
public async Task VerifyAzureServiceBusEmulatorResource ( )
221
221
{
You can’t perform that action at this time.
0 commit comments