This repository was archived by the owner on Jun 2, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
spec/unit/controllers/runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ def summary(guid)
2525 'available_domains' => ( process . space . organization . private_domains + SharedDomain . all ) . map ( &:as_summary_json )
2626 } . merge ( process . to_hash )
2727
28+ app_info [ 'environment_json' ] = process . app . environment_variables
29+
2830 MultiJson . dump ( app_info )
2931 end
3032
Original file line number Diff line number Diff line change @@ -9,9 +9,10 @@ module VCAP::CloudController
99 @shared_domain = SharedDomain . make
1010 @shared_domain . save
1111
12- @space = Space . make
13- @route1 = Route . make ( space : @space )
14- @route2 = Route . make ( space : @space )
12+ @space = Space . make
13+ @environment_json = { 'HELLO' => 'WORLD' }
14+ @route1 = Route . make ( space : @space )
15+ @route2 = Route . make ( space : @space )
1516 @services = [ ]
1617
1718 @process = ProcessModelFactory . make (
@@ -20,6 +21,7 @@ module VCAP::CloudController
2021 instances : 1 ,
2122 memory : @free_mem_size ,
2223 state : 'STARTED' ,
24+ environment_json : @environment_json
2325 )
2426
2527 @num_services . times do
@@ -56,6 +58,8 @@ module VCAP::CloudController
5658 it 'should contain the basic app attributes' do
5759 expect ( last_response . status ) . to eq ( 200 )
5860 expect ( decoded_response [ 'guid' ] ) . to eq ( @process . app . guid )
61+ expect ( decoded_response [ 'environment_json' ] ) . to eq ( { 'HELLO' => 'WORLD' } )
62+
5963 parse ( MultiJson . dump ( @process . to_hash ) ) . each do |k , v |
6064 expect ( v ) . to eql ( decoded_response [ k . to_s ] ) , "value of field #{ k } expected to eql #{ v } "
6165 end
You can’t perform that action at this time.
0 commit comments