@@ -430,7 +430,7 @@ Ensure (agent_controller, agent_update_new_initializes_defaults_correctly)
430430
431431 assert_that (update -> authorized , is_equal_to (-1 ));
432432 assert_that (update -> update_to_latest , is_equal_to (-1 ));
433- assert_that (update -> config , is_null );
433+ assert_that (update -> update_config , is_null );
434434
435435 agent_controller_agent_update_free (update );
436436}
@@ -440,7 +440,7 @@ Ensure (agent_controller, agent_update_free_handles_nested_schedule)
440440 agent_controller_agent_update_t update = agent_controller_agent_update_new ();
441441 assert_that (update , is_not_null );
442442
443- update -> config = agent_controller_agent_config_new ();
443+ update -> update_config = agent_controller_agent_config_new ();
444444
445445 agent_controller_agent_update_free (update );
446446 assert_that (true, is_true );
@@ -972,12 +972,12 @@ Ensure (agent_controller, patch_payload_includes_config_with_defaults_from_base)
972972 agent_controller_agent_update_list_t updates =
973973 make_update_list_with_ids (ids , 1 );
974974
975- updates -> updates [0 ]-> base = make_agent_config ();
976- updates -> updates [0 ]-> base -> heartbeat .interval_in_seconds = 600 ;
977- updates -> updates [0 ]-> base -> heartbeat .miss_until_inactive = 9 ;
975+ updates -> updates [0 ]-> base_config = make_agent_config ();
976+ updates -> updates [0 ]-> base_config -> heartbeat .interval_in_seconds = 600 ;
977+ updates -> updates [0 ]-> base_config -> heartbeat .miss_until_inactive = 9 ;
978978
979- updates -> updates [0 ]-> config = agent_controller_agent_config_new ();
980- updates -> updates [0 ]-> config -> heartbeat .interval_in_seconds = 42 ;
979+ updates -> updates [0 ]-> update_config = agent_controller_agent_config_new ();
980+ updates -> updates [0 ]-> update_config -> heartbeat .interval_in_seconds = 42 ;
981981
982982 gchar * payload = agent_controller_build_patch_payload (updates );
983983
@@ -997,8 +997,8 @@ Ensure (agent_controller, patch_payload_omits_config_when_base_missing)
997997 agent_controller_agent_update_list_t updates =
998998 make_update_list_with_ids (ids , 1 );
999999
1000- updates -> updates [0 ]-> config = agent_controller_agent_config_new ();
1001- updates -> updates [0 ]-> config -> heartbeat .interval_in_seconds = 42 ;
1000+ updates -> updates [0 ]-> update_config = agent_controller_agent_config_new ();
1001+ updates -> updates [0 ]-> update_config -> heartbeat .interval_in_seconds = 42 ;
10021002
10031003 gchar * payload = agent_controller_build_patch_payload (updates );
10041004
@@ -2687,7 +2687,7 @@ Ensure (agent_controller, get_scan_id_returns_dup_string_on_success)
26872687 g_free (sid );
26882688}
26892689
2690- Ensure (agent_controller , build_config_with_defaults_fills_zeros_from_base )
2690+ Ensure (agent_controller , build_updated_agent_config_fills_zeros_from_base )
26912691{
26922692 agent_controller_agent_config_t base = make_agent_config ();
26932693 assert_that (base , is_not_null );
@@ -2698,7 +2698,7 @@ Ensure (agent_controller, build_config_with_defaults_fills_zeros_from_base)
26982698 upd -> heartbeat .interval_in_seconds = 42 ;
26992699
27002700 agent_controller_agent_config_t merged =
2701- agent_controller_build_agent_config_with_defaults (base , upd );
2701+ agent_controller_build_updated_agent_config (base , upd );
27022702
27032703 assert_that (merged , is_not_null );
27042704
@@ -2718,7 +2718,7 @@ Ensure (agent_controller, build_config_with_defaults_fills_zeros_from_base)
27182718 agent_controller_agent_config_free (base );
27192719}
27202720
2721- Ensure (agent_controller , build_config_with_defaults_deep_copies_update_cron )
2721+ Ensure (agent_controller , build_updated_agent_config_deep_copies_update_cron )
27222722{
27232723 agent_controller_agent_config_t base = make_agent_config ();
27242724 assert_that (base , is_not_null );
@@ -2732,7 +2732,7 @@ Ensure (agent_controller, build_config_with_defaults_deep_copies_update_cron)
27322732 g_strdup ("0 0 * * *" ));
27332733
27342734 agent_controller_agent_config_t merged =
2735- agent_controller_build_agent_config_with_defaults (base , upd );
2735+ agent_controller_build_updated_agent_config (base , upd );
27362736
27372737 assert_that (merged , is_not_null );
27382738 assert_that (merged -> agent_script_executor .scheduler_cron_time , is_not_null );
@@ -2759,7 +2759,7 @@ Ensure (agent_controller, build_config_with_defaults_deep_copies_update_cron)
27592759}
27602760
27612761Ensure (agent_controller ,
2762- build_config_with_defaults_deep_copies_base_cron_when_update_missing )
2762+ build_updated_agent_config_deep_copies_base_cron_when_update_missing )
27632763{
27642764 agent_controller_agent_config_t base = make_agent_config ();
27652765 assert_that (base , is_not_null );
@@ -2768,7 +2768,7 @@ Ensure (agent_controller,
27682768 assert_that (upd , is_not_null );
27692769
27702770 agent_controller_agent_config_t merged =
2771- agent_controller_build_agent_config_with_defaults (base , upd );
2771+ agent_controller_build_updated_agent_config (base , upd );
27722772
27732773 assert_that (merged , is_not_null );
27742774 assert_that (merged -> agent_script_executor .scheduler_cron_time , is_not_null );
@@ -2801,15 +2801,15 @@ Ensure (agent_controller, patch_payload_config_zeros_default_to_base_values)
28012801
28022802 updates -> updates [0 ]-> authorized = 1 ;
28032803
2804- updates -> updates [0 ]-> base = make_agent_config ();
2805- assert_that (updates -> updates [0 ]-> base , is_not_null );
2804+ updates -> updates [0 ]-> base_config = make_agent_config ();
2805+ assert_that (updates -> updates [0 ]-> base_config , is_not_null );
28062806
28072807 /* Set base heartbeat to different values */
2808- updates -> updates [0 ]-> base -> heartbeat .interval_in_seconds = 600 ;
2809- updates -> updates [0 ]-> base -> heartbeat .miss_until_inactive = 9 ;
2808+ updates -> updates [0 ]-> base_config -> heartbeat .interval_in_seconds = 600 ;
2809+ updates -> updates [0 ]-> base_config -> heartbeat .miss_until_inactive = 9 ;
28102810
2811- updates -> updates [0 ]-> config = agent_controller_agent_config_new ();
2812- assert_that (updates -> updates [0 ]-> config , is_not_null );
2811+ updates -> updates [0 ]-> update_config = agent_controller_agent_config_new ();
2812+ assert_that (updates -> updates [0 ]-> update_config , is_not_null );
28132813
28142814 gchar * payload = agent_controller_build_patch_payload (updates );
28152815
@@ -2831,7 +2831,7 @@ Ensure (agent_controller,
28312831 assert_that (upd , is_not_null );
28322832
28332833 agent_controller_agent_config_t merged =
2834- agent_controller_build_agent_config_with_defaults (NULL , upd );
2834+ agent_controller_build_updated_agent_config (NULL , upd );
28352835
28362836 assert_that (merged , is_null );
28372837
@@ -2848,7 +2848,7 @@ Ensure (agent_controller,
28482848 base -> heartbeat .miss_until_inactive = 3 ;
28492849
28502850 agent_controller_agent_config_t merged =
2851- agent_controller_build_agent_config_with_defaults (base , NULL );
2851+ agent_controller_build_updated_agent_config (base , NULL );
28522852
28532853 assert_that (merged , is_not_null );
28542854
@@ -2888,7 +2888,7 @@ Ensure (agent_controller,
28882888 upd -> heartbeat .interval_in_seconds = 42 ;
28892889
28902890 agent_controller_agent_config_t merged =
2891- agent_controller_build_agent_config_with_defaults (base , upd );
2891+ agent_controller_build_updated_agent_config (base , upd );
28922892
28932893 assert_that (merged , is_not_null );
28942894 assert_that (merged -> heartbeat .interval_in_seconds , is_equal_to (42 ));
@@ -3360,12 +3360,12 @@ main (int argc, char **argv)
33603360 add_test_with_context (suite , agent_controller ,
33613361 get_scan_id_returns_dup_string_on_success );
33623362 add_test_with_context (suite , agent_controller ,
3363- build_config_with_defaults_fills_zeros_from_base );
3363+ build_updated_agent_config_fills_zeros_from_base );
33643364 add_test_with_context (suite , agent_controller ,
3365- build_config_with_defaults_deep_copies_update_cron );
3365+ build_updated_agent_config_deep_copies_update_cron );
33663366 add_test_with_context (
33673367 suite , agent_controller ,
3368- build_config_with_defaults_deep_copies_base_cron_when_update_missing );
3368+ build_updated_agent_config_deep_copies_base_cron_when_update_missing );
33693369 add_test_with_context (suite , agent_controller ,
33703370 patch_payload_config_zeros_default_to_base_values );
33713371 add_test_with_context (
0 commit comments