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)
4747 /// <returns>A configured instance of <see cref="OracleBuilder" />.</returns>
4848 public OracleBuilder WithDatabase ( string database )
4949 {
50- return Merge ( DockerResourceConfiguration , new OracleConfiguration ( database : database ) )
51- . WithEnvironment ( "ORACLE_DATABASE" , database ) ;
50+ return Merge ( DockerResourceConfiguration , new OracleConfiguration ( database : database ) ) ;
5251 }
5352
5453 /// <summary>
@@ -85,6 +84,11 @@ public override OracleContainer Build()
8584 return new OracleContainer ( WithDatabase ( defaultServiceName ) . DockerResourceConfiguration ) ;
8685 }
8786
87+ if ( DockerResourceConfiguration . Database != defaultServiceName )
88+ {
89+ return new OracleContainer ( WithEnvironment ( "ORACLE_DATABASE" , DockerResourceConfiguration . Database ) . DockerResourceConfiguration ) ;
90+ }
91+
8892 return new OracleContainer ( DockerResourceConfiguration ) ;
8993 }
9094
You can’t perform that action at this time.
0 commit comments