From b94937c05c49c4f39522e734890f7cb6227c4e9e Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 18 Mar 2020 11:51:54 +0100 Subject: [PATCH] Update provisioner_test.go (#8900) --- provisioner/shell/provisioner_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) } }