File tree Expand file tree Collapse file tree
src/Testcontainers/Clients
tests/Testcontainers.Tests/Unit/Containers/Unix Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,11 @@ public void Report(JSONMessage value)
5555 {
5656 _logger . LogDebug ( "Auxiliary data: {ExtensionData}" , JsonSerializer . Serialize ( value . Aux . ExtensionData ) ) ;
5757 }
58+
59+ if ( value . Error != null )
60+ {
61+ throw new Exception ( value . Error . Message ) ;
62+ }
5863 }
5964 }
6065}
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ namespace DotNet.Testcontainers.Tests.Unit
55 using System . IO ;
66 using System . Net ;
77 using System . Net . Sockets ;
8+ using System . Runtime . InteropServices ;
89 using System . Text ;
910 using System . Threading . Tasks ;
1011 using DotNet . Testcontainers . Builders ;
@@ -545,6 +546,21 @@ public async Task PullPolicyNever()
545546 await Assert . ThrowsAnyAsync < Exception > ( ( ) => container . StartAsync ( TestContext . Current . CancellationToken ) )
546547 . ConfigureAwait ( true ) ;
547548 }
549+
550+ [ Fact ]
551+ public async Task NoMatchingManifest ( )
552+ {
553+ Assert . SkipWhen ( RuntimeInformation . ProcessArchitecture == Architecture . X64 , "Only relevant on non x64 architectures" ) ;
554+
555+ await using var container = new ContainerBuilder ( "alpine:3.1" )
556+ . WithEntrypoint ( CommonCommands . SleepInfinity )
557+ . WithImagePullPolicy ( PullPolicy . Always )
558+ . Build ( ) ;
559+
560+ var exception = await Assert . ThrowsAnyAsync < Exception > ( ( ) => container . StartAsync ( TestContext . Current . CancellationToken ) )
561+ . ConfigureAwait ( true ) ;
562+ Assert . Contains ( "no matching manifest" , exception . Message ) ;
563+ }
548564 }
549565 }
550566}
You can’t perform that action at this time.
0 commit comments