Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dehort committed Dec 9, 2024
1 parent 09b58e6 commit afea6fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/common/ansible/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ var _ = Describe("Ansible", func() {
It("determines stdout from a failed run", func() {
events := loadFile("./test-events2.jsonl")
stdout := GetStdout(events, nil)
Expect(stdout).To(Equal("\r\nPLAY [ping] ********************************************************************\r\nTASK [fail] ********************************************************************\x1b[0;31mfatal: [localhost]: FAILED! => {\"changed\": false, \"msg\": \"Always fail\"}\x1b[0m\r\nPLAY RECAP *********************************************************************\r\n\x1b[0;31mlocalhost\x1b[0m : ok=0 changed=0 unreachable=0 \x1b[0;31mfailed=1 \x1b[0m skipped=0 rescued=0 ignored=0 \r\n"))
Expect(stdout).To(Equal("\r\nPLAY [ping] ********************************************************************\n\r\nTASK [fail] ********************************************************************\n\x1b[0;31mfatal: [localhost]: FAILED! => {\"changed\": false, \"msg\": \"Always fail\"}\x1b[0m\n\r\nPLAY RECAP *********************************************************************\r\n\x1b[0;31mlocalhost\x1b[0m : ok=0 changed=0 unreachable=0 \x1b[0;31mfailed=1 \x1b[0m skipped=0 rescued=0 ignored=0 \r\n\n"))
})

It("determines stdout from an incomplete run", func() {
events := loadFile("./test-events3.jsonl")
stdout := GetStdout(events, nil)
Expect(stdout).To(Equal("\r\nPLAY [ping] ********************************************************************\r\nTASK [ping] ********************************************************************"))
Expect(stdout).To(Equal("\r\nPLAY [ping] ********************************************************************\n\r\nTASK [ping] ********************************************************************\n"))
})

It("determines stdout from an incomplete run (2)", func() {
Expand Down

0 comments on commit afea6fa

Please sign in to comment.