diff --git a/acceptance/tests/cycle_detection.rb b/acceptance/tests/cycle_detection.rb new file mode 100644 index 000000000..c59ca9e0f --- /dev/null +++ b/acceptance/tests/cycle_detection.rb @@ -0,0 +1,26 @@ +test_name "cycle detection and reporting" + +step "check we report a simple cycle" +manifest = < Notify["a2"] } +notify { "a2": require => Notify["a1"] } +EOT + +apply_manifest_on(agents, manifest) do + assert_match(/Found 1 dependency cycle/, stdout, + "found and reported the cycle correctly") +end + +step "report multiple cycles in the same graph" +manifest = < Notify["a2"] } +notify { "a2": require => Notify["a1"] } + +notify { "b1": require => Notify["b2"] } +notify { "b2": require => Notify["b1"] } +EOT + +apply_manifest_on(agents, manifest) do + assert_match(/Found 2 dependency cycles/, stdout, + "found and reported the cycle correctly") +end