docs(ClickHouse): Add example#1421
Conversation
✅ Deploy Preview for testcontainers-dotnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
HofmeisterAn
left a comment
There was a problem hiding this comment.
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 |
HofmeisterAn
left a comment
There was a problem hiding this comment.
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). |
HofmeisterAn
left a comment
There was a problem hiding this comment.
Thanks! I am just waiting until icr.io is back and working again.
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 upand access the docs at:http://localhost:8000.