@@ -493,13 +493,16 @@ test_remotely('test_patch_clusterwide', function()
493493 local _patch = cartridge .config_patch_clusterwide
494494 local _get_ro = cartridge .config_get_readonly
495495
496+ local vars = require (' cartridge.vars' ).new (' cartridge.twophase' )
497+
496498 ---- ----------------------------------------------------------------
497499 local ok , err = _patch ({
498500 [' data' ] = " friday" ,
499501 })
500502 t .assert_equals (err , nil )
501503 t .assert_equals (ok , true )
502504 t .assert_equals (_get_ro (' data' ), ' friday' )
505+ t .assert (vars .config_applied )
503506
504507 ---- ----------------------------------------------------------------
505508 local ok , err = _patch ({
@@ -508,6 +511,7 @@ test_remotely('test_patch_clusterwide', function()
508511 t .assert_equals (err , nil )
509512 t .assert_equals (ok , true )
510513 t .assert_equals (_get_ro (' data' ), {today = ' friday' })
514+ t .assert (vars .config_applied )
511515
512516 ---- ----------------------------------------------------------------
513517 local ok , err = _patch ({
@@ -517,6 +521,7 @@ test_remotely('test_patch_clusterwide', function()
517521 t .assert_equals (err , nil )
518522 t .assert_equals (ok , true )
519523 t .assert_equals (_get_ro (' data' ), {tomorow = ' saturday' })
524+ t .assert (vars .config_applied )
520525
521526 local ok , err = _patch ({
522527 [' data.yml' ] = ' {tomorow: saturday} # so excited' ,
@@ -525,6 +530,7 @@ test_remotely('test_patch_clusterwide', function()
525530 t .assert_equals (ok , true )
526531 t .assert_equals (_get_ro (' data' ), {tomorow = ' saturday' })
527532 t .assert_equals (_get_ro (' data.yml' ), ' {tomorow: saturday} # so excited' )
533+ t .assert (vars .config_applied )
528534
529535 ---- ----------------------------------------------------------------
530536 local ok , err = _patch ({
@@ -534,6 +540,7 @@ test_remotely('test_patch_clusterwide', function()
534540 t .assert_equals (ok , true )
535541 t .assert_equals (_get_ro (' data' ), nil )
536542 t .assert_equals (_get_ro (' data.yml' ), nil )
543+ t .assert (vars .config_applied )
537544
538545 ---- ----------------------------------------------------------------
539546 local ok , err = _patch ({
@@ -543,6 +550,7 @@ test_remotely('test_patch_clusterwide', function()
543550 t .assert_equals (ok , true )
544551 t .assert_equals (_get_ro (' data' ), {afterwards = ' sunday' })
545552 t .assert_equals (_get_ro (' data.yml' ), ' {afterwards: sunday}' )
553+ t .assert (vars .config_applied )
546554
547555 ---- ----------------------------------------------------------------
548556 local ok , err = _patch ({[' data' ] = " Fun, fun, fun, fun" ,})
@@ -551,6 +559,7 @@ test_remotely('test_patch_clusterwide', function()
551559 class_name = ' LoadConfigError' ,
552560 err = ' Ambiguous sections "data" and "data.yml"'
553561 })
562+ t .assert_not (vars .config_applied )
554563 local ok , err = _patch ({
555564 [' data' ] = " Fun, fun, fun, fun" ,
556565 [' data.yml' ] = box .NULL ,
@@ -559,6 +568,7 @@ test_remotely('test_patch_clusterwide', function()
559568 t .assert_equals (ok , true )
560569 t .assert_equals (_get_ro (' data' ), " Fun, fun, fun, fun" )
561570 t .assert_equals (_get_ro (' data.yml' ), nil )
571+ t .assert (vars .config_applied )
562572
563573 ---- ----------------------------------------------------------------
564574 local ok , err = _patch ({[' data.yml' ] = " ---\n Weekend\n ..." ,})
@@ -567,6 +577,7 @@ test_remotely('test_patch_clusterwide', function()
567577 class_name = ' LoadConfigError' ,
568578 err = ' Ambiguous sections "data" and "data.yml"'
569579 })
580+ t .assert_not (vars .config_applied )
570581 local ok , err = _patch ({
571582 [' data' ] = box .NULL ,
572583 [' data.yml' ] = " ---\n Weekend\n ..." ,
@@ -575,6 +586,7 @@ test_remotely('test_patch_clusterwide', function()
575586 t .assert_equals (ok , true )
576587 t .assert_equals (_get_ro (' data' ), " Weekend" )
577588 t .assert_equals (_get_ro (' data.yml' ), " ---\n Weekend\n ..." )
589+ t .assert (vars .config_applied )
578590
579591 ---- ----------------------------------------------------------------
580592 local ok , err = _patch ({
@@ -586,6 +598,7 @@ test_remotely('test_patch_clusterwide', function()
586598 class_name = ' PatchConfigError' ,
587599 err = ' Ambiguous sections "conflict" and "conflict.yml"' ,
588600 })
601+ t .assert_not (vars .config_applied )
589602end )
590603
591604
0 commit comments