Connection not closed when database name is incorrect #173 fix #347
Workflow file for this run
This file contains 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
name: pr-validation | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.19','1.20'] | |
sqlImage: ['2019-latest','2022-latest'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '${{ matrix.go }}' | |
- name: Run tests against Linux SQL | |
run: | | |
go version | |
export SQLCMDPASSWORD=$(date +%s|sha256sum|base64|head -c 32) | |
export SQLCMDUSER=sa | |
export SQLUSER=sa | |
export SQLPASSWORD=$SQLCMDPASSWORD | |
export DATABASE=test | |
docker run -m 2GB -e ACCEPT_EULA=1 -d --name sqlserver -p:1433:1433 -e SA_PASSWORD=$SQLCMDPASSWORD mcr.microsoft.com/mssql/server:${{ matrix.sqlImage }} | |
sleep 10 | |
sqlcmd -Q "CREATE DATABASE test" | |
go test -v ./... |