Fix playbook_files test on Windows.
This commit is contained in:
parent
f682045345
commit
9ea6313b68
|
@ -152,6 +152,7 @@ func TestProvisionerPrepare_PlaybookFiles(t *testing.T) {
|
||||||
func assertPlaybooksExecuted(comm *communicatorMock, playbooks []string) {
|
func assertPlaybooksExecuted(comm *communicatorMock, playbooks []string) {
|
||||||
cmdIndex := 0
|
cmdIndex := 0
|
||||||
for _, playbook := range playbooks {
|
for _, playbook := range playbooks {
|
||||||
|
playbook = filepath.ToSlash(playbook)
|
||||||
for ; cmdIndex < len(comm.startCommand); cmdIndex++ {
|
for ; cmdIndex < len(comm.startCommand); cmdIndex++ {
|
||||||
cmd := comm.startCommand[cmdIndex]
|
cmd := comm.startCommand[cmdIndex]
|
||||||
if strings.Contains(cmd, "ansible-playbook") && strings.Contains(cmd, playbook) {
|
if strings.Contains(cmd, "ansible-playbook") && strings.Contains(cmd, playbook) {
|
||||||
|
@ -167,6 +168,7 @@ func assertPlaybooksExecuted(comm *communicatorMock, playbooks []string) {
|
||||||
func assertPlaybooksUploaded(comm *communicatorMock, playbooks []string) {
|
func assertPlaybooksUploaded(comm *communicatorMock, playbooks []string) {
|
||||||
uploadIndex := 0
|
uploadIndex := 0
|
||||||
for _, playbook := range playbooks {
|
for _, playbook := range playbooks {
|
||||||
|
playbook = filepath.ToSlash(playbook)
|
||||||
for ; uploadIndex < len(comm.uploadDestination); uploadIndex++ {
|
for ; uploadIndex < len(comm.uploadDestination); uploadIndex++ {
|
||||||
dest := comm.uploadDestination[uploadIndex]
|
dest := comm.uploadDestination[uploadIndex]
|
||||||
if strings.HasSuffix(dest, playbook) {
|
if strings.HasSuffix(dest, playbook) {
|
||||||
|
|
Loading…
Reference in New Issue