File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/Testcontainers.Oracle Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -47,8 +47,7 @@ private OracleBuilder(OracleConfiguration resourceConfiguration)
47
47
/// <returns>A configured instance of <see cref="OracleBuilder" />.</returns>
48
48
public OracleBuilder WithDatabase ( string database )
49
49
{
50
- return Merge ( DockerResourceConfiguration , new OracleConfiguration ( database : database ) )
51
- . WithEnvironment ( "ORACLE_DATABASE" , database ) ;
50
+ return Merge ( DockerResourceConfiguration , new OracleConfiguration ( database : database ) ) ;
52
51
}
53
52
54
53
/// <summary>
@@ -85,6 +84,11 @@ public override OracleContainer Build()
85
84
return new OracleContainer ( WithDatabase ( defaultServiceName ) . DockerResourceConfiguration ) ;
86
85
}
87
86
87
+ if ( DockerResourceConfiguration . Database != defaultServiceName )
88
+ {
89
+ return new OracleContainer ( WithEnvironment ( "ORACLE_DATABASE" , DockerResourceConfiguration . Database ) . DockerResourceConfiguration ) ;
90
+ }
91
+
88
92
return new OracleContainer ( DockerResourceConfiguration ) ;
89
93
}
90
94
You can’t perform that action at this time.
0 commit comments