Update provisioner_test.go (#8900)

This commit is contained in:
Adrien Delorme 2020-03-18 11:51:54 +01:00 committed by GitHub
parent 2319521aa5
commit b94937c05c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -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)
}
}