-
-
Notifications
You must be signed in to change notification settings - Fork 316
docs(ClickHouse): Add example #1421
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
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Thanks for the PR. I haven't merged it yet because there was another one open that changed the ClickHouse tests (it adds the ADO.NET wait strategy: #1401). We'll need to update the documentation for this, similar to what we did for the other modules, I think.
Honestly, I don't think our current setup is ideal. The tests are optimized for testing, but not really for documentation purposes. Maybe it would make sense to use separate classes just for the documentation in the future. The original idea was to reference real source code in the docs to make sure everything compiles. But that's something we can discuss and address in a separate issue/PR.
Thanks again.
Yes, it completely changed everything 😄 I just copied the old tests' code for docs, because new tests are more..massive? (at least for a quick docs example). They also cross reference another project, I don't see good way to include all this in docs examples...This boilerplate:
is now included in |
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.
Sorry for the back and forth. What do you think about creating a separate file (something like ClickHouseContainerTest.docs.cs
) alongside the test class? This file would contain the sources used for documentation.
We could make the test class partial
, and then use a nested class just for documentation purposes. That way, we keep things clean and separate.
public abstract partial class ClickHouseContainerTest
{
public sealed class Documentation
{
private readonly ClickHouseContainer _clickHouseContainer = new ClickHouseBuilder().Build();
}
}
LMKWYT.
Yes, this looks like a solution. Not sure why we need partial class? |
Oh, we don't need it. I just thought it might be nice to use a separate file to keep things organized, without mixing too much into one file (while keeping the same class name). |
What does this PR do?
Add ClickHouse example to modules section in docs.
Why is it important?
ClickHouse module docs are missing.
How to test this PR
Simply run
docker compose up
and access the docs at:http://localhost:8000
.