Skip to content

Commit 80d422c

Browse files
committed
chore(docker_mounts): stop doing misleading logging
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.
1 parent 83ae8bf commit 80d422c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docker_mounts.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ func mapToDockerMounts(containerMounts ContainerMounts) []mount.Mount {
107107
containerMount.VolumeOptions = typedMounter.GetVolumeOptions()
108108
case TmpfsMounter:
109109
containerMount.TmpfsOptions = typedMounter.GetTmpfsOptions()
110-
default:
110+
case BindMounter:
111111
Logger.Printf("Mount type %s is not supported by Testcontainers for Go", m.Source.Type())
112+
default:
113+
// The provided source type has no custom options
112114
}
113115

114116
mounts = append(mounts, containerMount)

0 commit comments

Comments
 (0)