File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
tests/Aspire.Hosting.MySql.Tests Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -522,9 +522,11 @@ public async Task MySql_WithPersistentLifetime_ReusesContainers(bool useMultiple
522522 }
523523 }
524524
525- [ Fact ]
525+ [ Theory ]
526+ [ InlineData ( false ) ]
527+ [ InlineData ( true ) ]
526528 [ RequiresDocker ]
527- public async Task AddDatabaseCreatesNewDatabaseWithCustomScript ( )
529+ public async Task AddDatabaseCreatesNewDatabaseWithCustomScript ( bool addEnvVar )
528530 {
529531 var mySqlDbName = "my-test-db" ;
530532
@@ -535,7 +537,12 @@ public async Task AddDatabaseCreatesNewDatabaseWithCustomScript()
535537
536538 using var builder = TestDistributedApplicationBuilder . Create ( o => { } , testOutputHelper ) ;
537539
538- var mysql = builder . AddMySql ( "mysql" ) . WithEnvironment ( "MYSQL_DATABASE" , mySqlDbName ) ;
540+ var mysql = builder . AddMySql ( "mysql" ) ;
541+
542+ if ( addEnvVar )
543+ {
544+ mysql = mysql . WithEnvironment ( "MYSQL_DATABASE" , mySqlDbName ) ;
545+ }
539546
540547 // Create a database with Accent Insensitive collation
541548 var newDb = mysql . AddDatabase ( mySqlDbName )
You can’t perform that action at this time.
0 commit comments