@@ -70,7 +70,7 @@ describe DryRunnable do |
||
| 70 | 70 |
[@agent.memory, counts] |
| 71 | 71 |
} |
| 72 | 72 |
|
| 73 |
- expect(results[:log]).to match(/\AE, .+ ERROR -- : Exception during dry-run. SandboxedAgent does not support dry-run: /) |
|
| 73 |
+ expect(results[:log]).to match(/\A\[\d\d:\d\d:\d\d\] INFO -- : Dry Run failed\n\[\d\d:\d\d:\d\d\] ERROR -- : Exception during dry-run. SandboxedAgent does not support dry-run: /) |
|
| 74 | 74 |
expect(results[:events]).to eq([]) |
| 75 | 75 |
expect(results[:memory]).to eq({})
|
| 76 | 76 |
end |
@@ -86,7 +86,7 @@ describe DryRunnable do |
||
| 86 | 86 |
[@agent.memory, counts] |
| 87 | 87 |
} |
| 88 | 88 |
|
| 89 |
- expect(results[:log]).to match(/\AI, .+ INFO -- : Logging\nE, .+ ERROR -- : Recording error\n/) |
|
| 89 |
+ expect(results[:log]).to match(/\A\[\d\d:\d\d:\d\d\] INFO -- : Dry Run started\n\[\d\d:\d\d:\d\d\] INFO -- : Logging\n\[\d\d:\d\d:\d\d\] ERROR -- : Recording error\n/) |
|
| 90 | 90 |
expect(results[:events]).to eq([{ 'test' => 'foo' }, { 'test' => 'bar' }])
|
| 91 | 91 |
expect(results[:memory]).to eq({ 'last_status' => 'ok', 'dry_run' => true })
|
| 92 | 92 |
end |
@@ -101,7 +101,7 @@ describe DryRunnable do |
||
| 101 | 101 |
[@agent.memory, counts] |
| 102 | 102 |
} |
| 103 | 103 |
|
| 104 |
- expect(results[:log]).to match(/\AI, .+ INFO -- : Logging\nE, .+ ERROR -- : Recording error\n/) |
|
| 104 |
+ expect(results[:log]).to match(/\A\[\d\d:\d\d:\d\d\] INFO -- : Dry Run started\n\[\d\d:\d\d:\d\d\] INFO -- : Logging\n\[\d\d:\d\d:\d\d\] ERROR -- : Recording error\n/) |
|
| 105 | 105 |
expect(results[:events]).to eq([{ 'test' => 'superfoo' }, { 'test' => 'superbar' }])
|
| 106 | 106 |
expect(results[:memory]).to eq({ 'last_status' => 'ok', 'dry_run' => true })
|
| 107 | 107 |
end |
@@ -406,7 +406,7 @@ describe AgentsController do |
||
| 406 | 406 |
[users(:bob).agents.count, users(:bob).events.count, users(:bob).logs.count, agent.name, agent.updated_at] |
| 407 | 407 |
} |
| 408 | 408 |
json = JSON.parse(response.body) |
| 409 |
- expect(json['log']).to match(/^I, .* : Fetching #{Regexp.quote(url_from_event)}$/)
|
|
| 409 |
+ expect(json['log']).to match(/^\[\d\d:\d\d:\d\d\] INFO -- : Fetching #{Regexp.quote(url_from_event)}$/)
|
|
| 410 | 410 |
end |
| 411 | 411 |
end |
| 412 | 412 |
|