mirror of
https://github.com/hashicorp/packer.git
synced 2026-02-05 12:45:10 +01:00
Update provisioner_test.go (#8900)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user