@@ -314,10 +314,13 @@ func (c *MssqlBase) createContainer(imageName string, contextName string) {
314314 endpoint , _ := config .CurrentContext ()
315315
316316 // Connect to the instance as `sa` so we can create a new user
317+ //
318+ // For Unit Testing we use the Docker Hello World container, which
319+ // starts much faster than the SQL Server container!
317320 if c .errorLogEntryToWaitFor == "Hello from Docker!" {
318- c .sql = sql .New (true )
321+ c .sql = sql .New (sql. SqlOptions { UnitTesting : true } )
319322 } else {
320- c .sql = sql .New (false )
323+ c .sql = sql .New (sql. SqlOptions {} )
321324 }
322325
323326 c .sql .Connect (
@@ -330,7 +333,7 @@ func (c *MssqlBase) createContainer(imageName string, contextName string) {
330333 Password : secret .Encode (saPassword , c .encryptPassword ),
331334 },
332335 Name : "sa" ,
333- }, false )
336+ }, sql. ConnectOptions { Interactive : false } )
334337
335338 // Download and restore DB if asked
336339 defaultDbAlreadyCreated := false
@@ -492,7 +495,11 @@ EXEC(@sql)`
492495 return
493496}
494497
495- func (c * MssqlBase ) downloadImage (imageName string , output * output.Output , controller * container.Controller ) {
498+ func (c * MssqlBase ) downloadImage (
499+ imageName string ,
500+ output * output.Output ,
501+ controller * container.Controller ,
502+ ) {
496503 output .Infof ("Downloading %v" , imageName )
497504 err := controller .EnsureImage (imageName )
498505 if err != nil || c .unitTesting {
0 commit comments