From 2ac148ea00617ea559b530ea86b4d77528bae8e9 Mon Sep 17 00:00:00 2001 From: "Sean R. Abraham" Date: Tue, 30 Jan 2024 11:08:44 -0700 Subject: [PATCH] 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. --- docker_mounts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker_mounts.go b/docker_mounts.go index d5d075c0533..a734276d5e0 100644 --- a/docker_mounts.go +++ b/docker_mounts.go @@ -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)