feat(mssql): add WithInitSQL function#2988
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
mdelapenya
left a comment
There was a problem hiding this comment.
I left some comments that need to be addressed before accepting the PR.
It's also important to add the new option to the docs at ./docs/modules/mssql.md, that will land into our docs here: https://golang.testcontainers.org/modules/mssql/
Other than that, the PR looks good, we just need to talk about my comments.
Thanks for your work and time here 🙇
Sure, I was a bit unsure on adding that myself or if it was generated. As for the structure, ok if I follow the previous conventions or do I need to add e.g. the |
9b6362b to
1961c15
Compare
c932c88 to
e3c479e
Compare
stevenh
left a comment
There was a problem hiding this comment.
Thanks for the updates, here's some more feedback based on the latest version
e3c479e to
f4e9a08
Compare
Yes, please use the following block: - Not available until the next release of testcontainers-go <a href="https://github.com/testcontainers/testcontainers-go"><span class="tc-version">:material-tag: main</span></a> |
ba02e3f to
8deb865
Compare
3c60861 to
d5bd9a1
Compare
|
Well, it's as they say Do you want to extend the scope of |
stevenh
left a comment
There was a problem hiding this comment.
Thanks for the quick updates, think we're getting close.
Did you see the replies to other threads about using PATH instead of parsing custom image?
Yer sorry, we've been trying to bring some improvement to the code base, which means that the patterns that you see elsewhere have changed, thanks for your patience and quick changes it really helps!
Good question, as you say some modules are using this for scripts as well as pure data (sql). I would not have expected that until you mentioned it, I wonder if |
d531279 to
547ad7e
Compare
|
Renamed it to |
547ad7e to
7237bfe
Compare
stevenh
left a comment
There was a problem hiding this comment.
Thanks for all your work on this, hope you managed to take away some learnings as I did.
|
@MattiasMTS could you update the PR title and description to match the code please |
|
@mdelapenya my suggestion to include In the mean time @MattiasMTS feel free to change that back to |
7237bfe to
0667479
Compare
|
Done. I also added a test of an old image to verify the |
@stevenh we usually develop the library following Go's release policy: https://golang.testcontainers.org/system_requirements/#go-version, which means we always develop the library in the lower supported version (1.23 at the moment) |
6403e18 to
e6bdc71
Compare
|
Hi @mdelapenya sorry for late feedback on this, totally forgot it. I fixed the linting now, hopefully should be mergable. Thanks. |
mdelapenya
left a comment
There was a problem hiding this comment.
LGTM, thanks for your time working on this 🙇
* main: feat(mssql): add WithInitSQL function (testcontainers#2988)
* main: chore(deps): bump github.com/opencontainers/image-spec from 1.1.0 to 1.1.1, dario.cat/mergo from 1.0.0 to 1.0.1 (testcontainers#3030) chore(deps): bump github/codeql-action from 3.28.0 to 3.28.11 (testcontainers#3014) chore(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1 (testcontainers#3013) chore: readd dependabot, including a way to refresh the project files for all the modules (testcontainers#2997) docs: refine texts on how to set the module image (testcontainers#3012) feat(modules): add dind module (testcontainers#3004) docs: correct container variable (testcontainers#3010) chore: update Weaviate version to v1.29.0 and Weaviate Go client to v5.0.2 (testcontainers#3006) chore(deps): bump docker/setup-docker-action from 4.1.0 to 4.2.0 (testcontainers#3002) docs: fix typo in Grafana lgtm module (testcontainers#2999) feat: add ScyllaDB module (testcontainers#2992) feat(mssql): add WithInitSQL function (testcontainers#2988)

What does this PR do?
Add
WithInitSQLfunction to facilitate any initial e.g. DDL scripts to be processed before testing against the container.Why is it important?
It will improve developer experience and follow the same conventions that exist for other modules, e.g.
mysql.How to test this PR
Run the
make testin the folder and it should run. I am usingpodman, so I modify the containerprovider during that time but should work as is if you're using docker