Begin adapting logging_SUITE for Thoas
This commit is contained in:
		
							parent
							
								
									fe13f69338
								
							
						
					
					
						commit
						1bea14fdca
					
				|  | @ -742,7 +742,7 @@ formatting_as_json_works(_, Context) -> | ||||||
|                  port => hd(erlang:ports()), |                  port => hd(erlang:ports()), | ||||||
|                  ref => erlang:make_ref()}, |                  ref => erlang:make_ref()}, | ||||||
|     {RandomMsg, Term} = log_and_return_json_object( |     {RandomMsg, Term} = log_and_return_json_object( | ||||||
|                           Context, Metadata, [return_maps]), |                           Context, Metadata), | ||||||
| 
 | 
 | ||||||
|     RandomMsgBin = list_to_binary(RandomMsg), |     RandomMsgBin = list_to_binary(RandomMsg), | ||||||
|     ?assertMatch(#{time := _}, Term), |     ?assertMatch(#{time := _}, Term), | ||||||
|  | @ -782,7 +782,7 @@ renaming_json_fields_works(Config) -> | ||||||
|                  integer => 1, |                  integer => 1, | ||||||
|                  string => "string", |                  string => "string", | ||||||
|                  list => ["s", a, 3]}, |                  list => ["s", a, 3]}, | ||||||
|     {RandomMsg, Term} = log_and_return_json_object(Context, Metadata, [return_maps]), |     {RandomMsg, Term} = log_and_return_json_object(Context, Metadata), | ||||||
| 
 | 
 | ||||||
|     RandomMsgBin = list_to_binary(RandomMsg), |     RandomMsgBin = list_to_binary(RandomMsg), | ||||||
|     ?assertMatch( |     ?assertMatch( | ||||||
|  | @ -808,7 +808,7 @@ removing_specific_json_fields_works(Config) -> | ||||||
|                  integer => 1, |                  integer => 1, | ||||||
|                  string => "string", |                  string => "string", | ||||||
|                  list => ["s", a, 3]}, |                  list => ["s", a, 3]}, | ||||||
|     {RandomMsg, Term} = log_and_return_json_object(Context, Metadata, [return_maps]), |     {RandomMsg, Term} = log_and_return_json_object(Context, Metadata), | ||||||
| 
 | 
 | ||||||
|     RandomMsgBin = list_to_binary(RandomMsg), |     RandomMsgBin = list_to_binary(RandomMsg), | ||||||
|     ?assertMatch( |     ?assertMatch( | ||||||
|  | @ -834,7 +834,7 @@ removing_non_mentionned_json_fields_works(Config) -> | ||||||
|                  integer => 1, |                  integer => 1, | ||||||
|                  string => "string", |                  string => "string", | ||||||
|                  list => ["s", a, 3]}, |                  list => ["s", a, 3]}, | ||||||
|     {RandomMsg, Term} = log_and_return_json_object(Context, Metadata, [return_maps]), |     {RandomMsg, Term} = log_and_return_json_object(Context, Metadata), | ||||||
| 
 | 
 | ||||||
|     RandomMsgBin = list_to_binary(RandomMsg), |     RandomMsgBin = list_to_binary(RandomMsg), | ||||||
|     ?assertMatch( |     ?assertMatch( | ||||||
|  | @ -860,7 +860,7 @@ configuring_verbosity_works(Config) -> | ||||||
|     rabbit_prelaunch_logging:clear_config_run_number(), |     rabbit_prelaunch_logging:clear_config_run_number(), | ||||||
|     rabbit_prelaunch_logging:setup(Context), |     rabbit_prelaunch_logging:setup(Context), | ||||||
| 
 | 
 | ||||||
|     {RandomMsg, Term} = log_and_return_json_object(Context, #{}, [return_maps]), |     {RandomMsg, Term} = log_and_return_json_object(Context, #{}), | ||||||
| 
 | 
 | ||||||
|     RandomMsgBin = list_to_binary(RandomMsg), |     RandomMsgBin = list_to_binary(RandomMsg), | ||||||
|     ?assertMatch( |     ?assertMatch( | ||||||
|  | @ -1368,7 +1368,7 @@ log_and_return_line(Context, Metadata) -> | ||||||
|                         ReOpts), |                         ReOpts), | ||||||
|     {RandomMsg, Line}. |     {RandomMsg, Line}. | ||||||
| 
 | 
 | ||||||
| log_and_return_json_object(Context, Metadata, DecodeOpts) -> | log_and_return_json_object(Context, Metadata) -> | ||||||
|     RandomMsg = get_random_string( |     RandomMsg = get_random_string( | ||||||
|                   32, |                   32, | ||||||
|                   "abcdefghijklmnopqrstuvwxyz" |                   "abcdefghijklmnopqrstuvwxyz" | ||||||
|  | @ -1384,7 +1384,7 @@ log_and_return_json_object(Context, Metadata, DecodeOpts) -> | ||||||
|                         "^.+\"" ++ RandomMsg ++ "\".+$", |                         "^.+\"" ++ RandomMsg ++ "\".+$", | ||||||
|                         ReOpts), |                         ReOpts), | ||||||
| 
 | 
 | ||||||
|     Term0 = rabbit_json:decode(Line, DecodeOpts), |     Term0 = rabbit_json:decode(Line), | ||||||
|     Term = rabbit_data_coercion:atomize_keys(Term0), |     Term = rabbit_data_coercion:atomize_keys(Term0), | ||||||
| 
 | 
 | ||||||
|     {RandomMsg, Term}. |     {RandomMsg, Term}. | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue