@@ -22,7 +22,8 @@ private static IDockerEndpointAuthenticationConfiguration GetAuthConfig(ProtectD
22
22
23
23
public sealed class MTlsOpenSsl1_1_1 : IClassFixture < OpenSsl1_1_1Fixture >
24
24
{
25
- private readonly OpenSsl1_1_1Fixture _fixture ;
25
+ private readonly ProtectDockerDaemonSocket _fixture ;
26
+
26
27
private readonly IDockerEndpointAuthenticationConfiguration _authConfig ;
27
28
28
29
public MTlsOpenSsl1_1_1 ( OpenSsl1_1_1Fixture dockerMTlsFixture )
@@ -36,20 +37,21 @@ public async Task GetVersionReturnsVersion()
36
37
{
37
38
// Given
38
39
var client = new TestcontainersClient ( Guid . Empty , _authConfig , NullLogger . Instance ) ;
40
+
39
41
// When
40
42
var version = await client . System . GetVersionAsync ( )
41
43
. ConfigureAwait ( false ) ;
42
- var key = _fixture . ClientCertificateKey ( ) ;
43
44
44
45
// Then
45
- Assert . Equal ( OpenSsl1_1_1Fixture . DockerVersion , version . Version ) ;
46
- Assert . IsType < AsymmetricCipherKeyPair > ( key ) ;
46
+ Assert . StartsWith ( version . Version , _fixture . Image . Tag ) ;
47
+ Assert . IsType < AsymmetricCipherKeyPair > ( _fixture . TlsKey ) ;
47
48
}
48
49
}
49
50
50
51
public sealed class MTlsOpenSsl3_1 : IClassFixture < OpenSsl3_1Fixture >
51
52
{
52
- private readonly OpenSsl3_1Fixture _fixture ;
53
+ private readonly ProtectDockerDaemonSocket _fixture ;
54
+
53
55
private readonly IDockerEndpointAuthenticationConfiguration _authConfig ;
54
56
55
57
public MTlsOpenSsl3_1 ( OpenSsl3_1Fixture dockerMTlsFixture )
@@ -63,23 +65,26 @@ public async Task GetVersionReturnsVersion()
63
65
{
64
66
// Given
65
67
var client = new TestcontainersClient ( Guid . Empty , _authConfig , NullLogger . Instance ) ;
68
+
66
69
// When
67
70
var version = await client . System . GetVersionAsync ( )
68
71
. ConfigureAwait ( false ) ;
69
- var key = _fixture . ClientCertificateKey ( ) ;
70
72
71
73
// Then
72
- Assert . Equal ( OpenSsl3_1Fixture . DockerVersion , version . Version ) ;
73
- Assert . IsType < RsaPrivateCrtKeyParameters > ( key ) ;
74
+ Assert . StartsWith ( version . Version , _fixture . Image . Tag ) ;
75
+ Assert . IsType < RsaPrivateCrtKeyParameters > ( _fixture . TlsKey ) ;
74
76
}
75
77
}
76
78
77
79
public sealed class Tls : IClassFixture < DockerTlsFixture >
78
80
{
81
+ private readonly ProtectDockerDaemonSocket _fixture ;
82
+
79
83
private readonly IDockerEndpointAuthenticationConfiguration _authConfig ;
80
84
81
85
public Tls ( DockerTlsFixture dockerTlsFixture )
82
86
{
87
+ _fixture = dockerTlsFixture ;
83
88
_authConfig = GetAuthConfig ( dockerTlsFixture ) ;
84
89
}
85
90
@@ -94,7 +99,7 @@ public async Task GetVersionReturnsVersion()
94
99
. ConfigureAwait ( false ) ;
95
100
96
101
// Then
97
- Assert . Equal ( DockerTlsFixture . DockerVersion , version . Version ) ;
102
+ Assert . StartsWith ( version . Version , _fixture . Image . Tag ) ;
98
103
}
99
104
}
100
105
}
0 commit comments