New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add module to support Microsoft SQL Server #1969
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
I made some minor changes after I saw the linting failed. It should be all set now - minor cleanup on tests. |
latest commit e70e482
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I suggested the fix for the double-spaced lines, so I'll commit them and merge this PR.
Thanks for your time working in this cool module! Much appreciated!
PS: because the module catalog project is in a private repo, I'll submit it asap and it will appear there really soon.
* main: chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.10 to 3.23.11 (testcontainers#1943)
* main: (24 commits) chore(deps): bump github.com/ClickHouse/clickhouse-go/v2 (testcontainers#1982) chore(deps): bump github.com/twmb/franz-go in /modules/redpanda (testcontainers#1973) chore(deps): bump google.golang.org/api from 0.152.0 to 0.153.0, cloud.google.com/go/bigtable from 1.20.0 to 1.21.0 and cloud.google.com/go/spanner from 1.53.0 to 1.53.1 in /modules/gcloud (testcontainers#1983) chore(deps): bump github.com/aws/aws-sdk-go and github.com/aws/aws-sdk-go-v2 in /modules/localstack (testcontainers#1981) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.1 to 6.0.4 (testcontainers#1974) feat: add module to support Microsoft SQL Server (testcontainers#1969) chore(deps): bump github.com/shirou/gopsutil/v3 from 3.23.10 to 3.23.11 (testcontainers#1943) chore(deps): bump golang.org/x/mod in /modules/kafka (testcontainers#1956) chore(deps): bump golang.org/x/sys from 0.13.0 to 0.15.0 (testcontainers#1944) chore(deps): bump golang.org/x/text and golang.org/x/mod from 0.13.0 to 0.14.0 in /modulegen (testcontainers#1968) chore(deps): bump go.mongodb.org/mongo-driver in /modules/mongodb (testcontainers#1960) chore(deps): bump github.com/couchbase/gocb/v2 in /modules/couchbase (testcontainers#1952) chore(deps): bump github.com/elastic/go-elasticsearch/v8 from 8.10.1 to 8.11.1 and golang.org/x/mod from 0.13.0 to 0.14.0 in /modules/elasticsearch (testcontainers#1967) chore(deps): bump github.com/aws/aws-sdk-go and github.com/aws/aws-sdk-go-v2 in /modules/localstack (testcontainers#1953) chore(deps): bump actions/github-script from 6.4.1 to 7.0.1 (testcontainers#1949) chore(deps): bump github.com/IBM/sarama in /modules/kafka (testcontainers#1955) chore(deps): bump github.com/neo4j/neo4j-go-driver/v5 in /modules/neo4j (testcontainers#1961) chore(deps): bump github.com/compose-spec/compose-go from 1.20.0 to 1.20.2 and github.com/docker/compose/v2 from 2.23.0 to 2.23.3 in /modules/compose (testcontainers#1966) chore(deps): bump google.golang.org/api from 0.143.0 to 0.152.0 and cloud.google.com/go/spanner from 1.50.0 to 1.53.0 in /modules/gcloud (testcontainers#1965) chore(deps): bump mkdocs-include-markdown-plugin from 6.0.1 to 6.0.4 (testcontainers#1934) ...
What does this PR do?
Preface: MS SQL Server Docker Container
Minimum required environment variables to start a mssql container:
MS SQL Server Docker image:
mcr.microsoft.com/mssql/server:2022-CU10-ubuntu-22.04
- sourceCritical File Notes
modules/mssql.go
const defaultImage = "mcr.microsoft.com/mssql/server:2022-CU10-ubuntu-22.04"
defaultUsername = "sa" // default microsoft system administrator
func WithAcceptEULA( )
func WithPassword(password string)
sqlserver://username:password@host:port?param1=value¶m2=value
modules/mssql_test.go
TestMSSQLServer
WithAcceptEula()
method, will not allow the container to be createdTestMSSQLServerWithMissingEulaOption
TestMSSQLServerWithConnectionStringParameters
connectionString, err := container.ConnectionString(ctx, "encrypt=false", "TrustServerCertificate=true")
TestMSSQLServerWithCustomStrongPassword
TestMSSQLServerWithInvalidPassword
TestMSSQLServerWithAlternativeImage
mcr.microsoft.com/mssql/server:2019-latest
modules/examples_test.go
ExampleRunContainer()
docs/modules/mssql.md
Why is it important?
Related issues