Skip to content

Commit

Permalink
chore(docker_mounts): stop doing misleading logging
Browse files Browse the repository at this point in the history
As things are, the logger statement here always triggers for normal use cases.
For example, if I start a container with this mount:
testcontainers.VolumeMount("some-vol", "/some/dir")

then I get this weird message in my logs
Mount type %!s(testcontainers.MountType=1) is not supported by Testcontainers for Go

because a GenericVolumeMountSource doesn't have an implementation of
`GetVolumeOptions() *mount.VolumeOptions`

I suggest removing that logging, as in this PR, because it's going to be purely
confusing for 99% of users.
  • Loading branch information
srabraham committed Jan 30, 2024
1 parent 83ae8bf commit 2ac148e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker_mounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func mapToDockerMounts(containerMounts ContainerMounts) []mount.Mount {
case TmpfsMounter:
containerMount.TmpfsOptions = typedMounter.GetTmpfsOptions()
default:
Logger.Printf("Mount type %s is not supported by Testcontainers for Go", m.Source.Type())
// The provided source type has no custom options
}

mounts = append(mounts, containerMount)
Expand Down

0 comments on commit 2ac148e

Please sign in to comment.