Skip to content

fix: allow compose files and readers to be used together#2598

Merged
mdelapenya merged 1 commit intotestcontainers:mainfrom
BoKleynen:fix/stack-files-and-readers
Jun 20, 2024
Merged

fix: allow compose files and readers to be used together#2598
mdelapenya merged 1 commit intotestcontainers:mainfrom
BoKleynen:fix/stack-files-and-readers

Conversation

@BoKleynen
Copy link
Copy Markdown
Contributor

What does this PR do?

Both WithStackFiles and WithStackReaders assign to the Paths field of the composeStackOptions which would result in the last option to overwrite all earlier options.

The documentation specifies that it's possible to use both files and readers.

This PR aligns the implementation with the documentation by appending to the Paths field instead of overwriting it.

Why is it important?

Align the implementation with what one would expect from the documentation

How to test this PR

I've included a test that includes both a file and a reader

@netlify
Copy link
Copy Markdown

netlify bot commented Jun 19, 2024

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 63f5278
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/667339cc0f96850008301397
😎 Deploy Preview https://deploy-preview-2598--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.

@BoKleynen BoKleynen marked this pull request as ready for review June 19, 2024 20:21
@BoKleynen BoKleynen requested a review from a team as a code owner June 19, 2024 20:21
@mdelapenya mdelapenya self-assigned this Jun 20, 2024
@mdelapenya mdelapenya added bug An issue with the library compose Docker Compose. labels Jun 20, 2024
Copy link
Copy Markdown
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the quick fix!

@mdelapenya mdelapenya merged commit 36573d0 into testcontainers:main Jun 20, 2024
mdelapenya added a commit that referenced this pull request Jun 20, 2024
* main:
  fix: allow compose files and readers to be used together (#2598)
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Jun 24, 2024
* main:
  docs: document disabling ryuk with properties (testcontainers#2603)
  fix: allow compose files and readers to be used together (testcontainers#2598)
  chore(deps): bump urllib3 from 2.2.1 to 2.2.2 (testcontainers#2590)
  docs: example for NATS cluster (testcontainers#2591)
mdelapenya added a commit to mdelapenya/testcontainers-go that referenced this pull request Jun 24, 2024
* main:
  docs: document disabling ryuk with properties (testcontainers#2603)
  fix: allow compose files and readers to be used together (testcontainers#2598)
  chore(deps): bump urllib3 from 2.2.1 to 2.2.2 (testcontainers#2590)
  docs: example for NATS cluster (testcontainers#2591)
  docs: fix deprecation for material extensions emoji (testcontainers#2592)
  gha: update golangci-lint to v1.59.1 (testcontainers#2588)
  network: WithCheckDuplicate: don't set CheckDuplicate value (testcontainers#2589)
  fix: proper synchronisation for start/stop log production (testcontainers#2576)
  chore(deps): bump github.com/docker/docker from v25.0.5 to v26.1.4 (testcontainers#2584)
  docs: update contributing guide (testcontainers#2586)
  feat: add testcontainers labels to the built images (testcontainers#2579)
  feat(mongodb): Make the replica set name configurable (testcontainers#2538)
  chore: skip reaper tests if ryuk is disabled (testcontainers#2582)
  chore: increase check time to 60 secs instead of 20 (testcontainers#2581)
  fix: prepend substitutors for built images (testcontainers#2577)
  docs: update colima docs (testcontainers#2578)
  fix(cockroachdb): Fixes cockroachdb wait strategy handling (testcontainers#2456)
  Fix race condition when looking up reaper (ryuk) container (testcontainers#2508)
  chore: bring golangci-lint back (testcontainers#2571)
  docs(compose): Fix typo docker compose docs (testcontainers#2565)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug An issue with the library compose Docker Compose.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants