diff --git a/provisioner/shell/provisioner_test.go b/provisioner/shell/provisioner_test.go index e720d0731..cf402ef8f 100644 --- a/provisioner/shell/provisioner_test.go +++ b/provisioner/shell/provisioner_test.go @@ -517,7 +517,7 @@ func TestProvisioner_RemotePathSetViaRemotePathAndRemoteFile(t *testing.T) { } if p.config.RemotePath != expectedRemoteFolder+"/"+expectedRemoteFile { - t.Fatalf("remote path does not contain remote_file") + t.Fatalf("remote path does not contain remote_file: %q", p.config.RemotePath) } } @@ -538,7 +538,7 @@ func TestProvisioner_RemotePathOverridesRemotePathAndRemoteFile(t *testing.T) { } if p.config.RemotePath != expectedRemotePath { - t.Fatalf("remote path does not contain remote_path") + t.Fatalf("remote path does not contain remote_path: %q", p.config.RemotePath) } } @@ -551,9 +551,9 @@ func TestProvisionerRemotePathDefaultsSuccessfully(t *testing.T) { t.Fatalf("should not have error: %s", err) } - remotePathRegex := regexp.MustCompile("/tmp/script_[0-9]{4}.sh") + remotePathRegex := regexp.MustCompile("/tmp/script_[0-9]{1,4}.sh") if !remotePathRegex.MatchString(p.config.RemotePath) { - t.Fatalf("remote path does not match the expected default regex") + t.Fatalf("remote path does not match the expected default regex: %q", p.config.RemotePath) } }