File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
spec/unit/lib/cloud_controller/diego Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -105,19 +105,12 @@ module Diego
105
105
stager . stage ( staging_details )
106
106
end . to raise_error ( CloudController ::Errors ::ApiError )
107
107
108
- expect (
109
- logs . read . find { |l | l [ 'message' ] == 'stage.package.error' }
110
- ) . to match (
111
- hash_including (
112
- 'message' => 'stage.package.error' ,
113
- 'data' => {
114
- 'package_guid' => package . guid ,
115
- 'staging_guid' => build . guid ,
116
- 'error' => 'something is very wrong' ,
117
- 'backtrace' => array_including ( /send_stage_package_request/ )
118
- }
119
- )
120
- )
108
+ log_hash = logs . read . find { |l | l [ 'message' ] == 'stage.package.error' }
109
+ expect ( log_hash [ 'message' ] ) . to eq ( 'stage.package.error' )
110
+ expect ( log_hash [ 'data' ] [ 'package_guid' ] ) . to eq ( package . guid )
111
+ expect ( log_hash [ 'data' ] [ 'staging_guid' ] ) . to eq ( build . guid )
112
+ expect ( log_hash [ 'data' ] [ 'error' ] ) . to eq ( 'something is very wrong' )
113
+ expect ( log_hash [ 'data' ] [ 'backtrace' ] . any? { |trace | trace . include? ( 'send_stage_package_request' ) } ) . to be ( true )
121
114
end
122
115
end
123
116
end
You can’t perform that action at this time.
0 commit comments