anchor.diff:      lists:append([{nodes, Nodes}, {assertions, Assertions}], Config).
   
   
  -end_per_testcase(_, Config) ->
  +end_per_testcase(main_test, Config) ->
       Nodes = ?config(nodes, Config),
       StopLog = nodes_manager:stop_app_on_nodes(Nodes),
       StopAns = nodes_manager:stop_nodes(Nodes),
  
positive.code: %% SetUp and TearDown functions
  %% ====================================================================
  
  init_per_testcase(_, Config) ->
      ?INIT_DIST_TEST,
      nodes_manager:start_deps_for_tester_node(),
  
  
negative.code: 
  %% export for ct
  -export([all/0, init_per_testcase/2, end_per_testcase/2]).
  -export([main_test/1]).
  
  all() -> [main_test].
  
  %% ====================================================================
  %% Test functions
  %% ====================================================================
  
  %% Main test, it initializes cluster and runs all other tests
  main_test(Config) ->
  	%init
  	nodes_manager:check_start_assertions(Config),
  	NodesUp = ?config(nodes, Config),
  	[CCM | _] = NodesUp,
  	put(ccm, CCM),
  	gen_server:cast({?Node_Manager_Name, CCM}, do_heart_beat),
  	gen_server:cast({global, ?CCM}, {set_monitoring, on}),
  	nodes_manager:wait_for_cluster_cast(),
  	gen_server:cast({global, ?CCM}, init_cluster),
  	nodes_manager:wait_for_cluster_init(),
  	ibrowse:start(),
  
  	%tests
  	connection_test(),
  	nagios_test(),
  
  	%cleanup
  	ibrowse:stop().
  
  %% Checks if control_panel listener is operational.
  connection_test() ->
      {ok, Port} = rpc:call(get(ccm), application, get_env, [veil_cluster_node, control_panel_port]),
      {_, Code, _, _} = ibrowse:send_req("https://localhost:" ++ integer_to_list(Port) , [], get),
  
      ?assertEqual(Code, "200").
  
  %% Sends nagios request and check if health status is ok, and if health report contains information about all workers
  nagios_test() ->
  	NagiosUrl = "https://localhost/nagios",
  	{ok, Code, _RespHeaders, Response} = rpc:call(get(ccm),ibrowse,send_req, [NagiosUrl,[],get]),
  	{Xml,_} = xmerl_scan:string(Response),
  	{Workers, _} = gen_server:call({global, ?CCM}, get_workers, 1000),
  
  