Skip to content

Commit

Permalink
Merge branch 'main' into go-workfile
Browse files Browse the repository at this point in the history
* main:
  chore: use require.Len instead of assert.Len (testcontainers#2854)
  chore: bump ryuk to 0.11.0 (testcontainers#2853)
  chore: enable usestdlibvars linter (testcontainers#2850)
  fix(compose): container initialisation (testcontainers#2844)
  fix!: data races (testcontainers#2843)
  fix: mongodb replicaset should work with auth (testcontainers#2847)
  • Loading branch information
mdelapenya committed Oct 29, 2024
2 parents 0463cc6 + 950d06b commit ac85826
Show file tree
Hide file tree
Showing 29 changed files with 570 additions and 285 deletions.
5 changes: 4 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,14 @@ linters:
- gofumpt
- misspell
- nolintlint
- nonamedreturns
- nakedret
- testifylint
- thelper
- usestdlibvars

linters-settings:
nakedret:
max-func-lines: 0
errorlint:
# Check whether fmt.Errorf uses the %w verb for formatting errors.
# See the https://github.com/polyfloyd/go-errorlint for caveats.
Expand Down
3 changes: 2 additions & 1 deletion commons-test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ test-%: $(GOBIN)/gotestsum
-- \
-v \
-coverprofile=coverage.out \
-timeout=30m
-timeout=30m \
-race

.PHONY: tools
tools:
Expand Down
9 changes: 9 additions & 0 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ type ContainerRequest struct {
LogConsumerCfg *LogConsumerConfig // define the configuration for the log producer and its log consumers to follow the logs
}

// sessionID returns the session ID for the container request.
func (c *ContainerRequest) sessionID() string {
if sessionID := c.Labels[core.LabelSessionID]; sessionID != "" {
return sessionID
}

return core.SessionID()
}

// containerOptions functional options for a container
type containerOptions struct {
ImageName string
Expand Down
Loading

0 comments on commit ac85826

Please sign in to comment.