Last active
October 21, 2017 15:23
-
-
Save samonzeweb/08dc9eb0f70bcc54ae5abd1a86aafe17 to your computer and use it in GitHub Desktop.
Testing godb on SQL Server through docker (OSX/Linux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Testing godb ( https://github.com/samonzeweb/godb ) with SQL Server on OSX / Linux | |
| docker run --name sqlserver -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=NotSoStr0ngP@ssword' -p 1433:1433 -d microsoft/mssql-server-linux:latest | |
| docker exec -i sqlserver /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P NotSoStr0ngP@ssword <<-EOF | |
| create database godb; | |
| go | |
| exit | |
| EOF | |
| GODB_MSSQL="Server=localhost;Database=godb;User Id=sa;Password=NotSoStr0ngP@ssword; MultipleActiveResultSets=true" go test | |
| docker stop sqlserver | |
| docker rm sqlserver | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment