Skip to content
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

docs: add consistent snippets for network creation #2703

Merged

Conversation

mdelapenya
Copy link
Member

@mdelapenya mdelapenya commented Aug 8, 2024

What does this PR do?

It separates the tests from the testable examples for the network creation, updating the docs to the new examples.

The new testable examples contain clearer code snippets for creating networks with and without options.

Render URL: https://deploy-preview-2703--testcontainers-go.netlify.app/features/creating_networks/#__tabbed_1_1

Why is it important?

Try to avoid confusing users reading our docs, as the default snippet used the internal option for creating networks, and this could cause issues when accessing the ports of containers in that internal network.

Follow-ups

Considering deprecating the functional option to make a network internal (which great power...)

@mdelapenya mdelapenya requested a review from a team as a code owner August 8, 2024 11:35
@mdelapenya mdelapenya added the documentation Docs, docs, docs. label Aug 8, 2024
@mdelapenya mdelapenya self-assigned this Aug 8, 2024
@mdelapenya mdelapenya requested a review from kiview August 8, 2024 11:35
Copy link

netlify bot commented Aug 8, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit df49a0f
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/66b4adfc5d76cd00080f1bf7
😎 Deploy Preview https://deploy-preview-2703--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@mdelapenya mdelapenya merged commit 150a48c into testcontainers:main Aug 8, 2024
112 checks passed
mdelapenya added a commit that referenced this pull request Aug 9, 2024
* main:
  fix(compose): remove test volumes (#2712)
  chore(mysql): add missing error check in example (#2707)
  chore: remove unused params from defaultPreCreateHook (#2714)
  docs: improve docs for container methods (#2713)
  chore(registry): disable build log (#2711)
  chore: remove obsolete compose version (#2710)
  chore: improve lifecycle errors (#2708)
  docs: add consistent snippets for network creation (#2703)
  test: add retry on system error test (#2687)
  Redpanda Module: Add option for arbitrary bootstrap config (#2666)
  feat(inbucket): expose POP3 and wait for all ports (#2690)
  fix(wait): data race in test (#2698)
  fix(milvus): racy container setup (#2693)
  fix(mongodb): replica test failures (#2699)
  test: racy port creation in port forwarding tests (#2688)
  fix: port forwarding race condition (#2686)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Docs, docs, docs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants