-
Notifications
You must be signed in to change notification settings - Fork 368
Expand file tree
/
Copy pathrunners_spec.rb
More file actions
35 lines (28 loc) · 903 Bytes
/
runners_spec.rb
File metadata and controls
35 lines (28 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'spec_helper'
module VCAP::CloudController
RSpec.describe Runners do
subject(:runners) { Runners.new(config) }
let(:config) do
Config.new({
staging: {
timeout_in_seconds: 90
}
})
end
describe '#runner_for_process' do
subject(:runner) { runners.runner_for_process(process) }
context 'when the app is configured to run on Diego' do
let(:process) { ProcessModelFactory.make(diego: true) }
it 'returns a Diego runner' do
expect(runner).to be_a(Diego::Runner)
end
context 'when the app has a docker image' do
let(:process) { ProcessModelFactory.make(:docker, docker_image: 'foobar') }
it 'finds a diego backend' do
expect(runner).to be_a(Diego::Runner)
end
end
end
end
end
end