aspiers / ansible-viz

Graph relationships between Ansible playbooks / roles / tasks / vars etc. via static analysis
Apache License 2.0
40 stars 6 forks source link

fix tests #1

Open aspiers opened 6 years ago

aspiers commented 6 years ago

There are still 2 tests failing.

Run options:

# Running tests:

[33/35] TC_Scoper#test_order_tasks = 0.00 s
  1) Failure:
TC_Scoper#test_order_tasks [/home/adam/.GIT/3rd-party/ansible-viz/test-scoper.rb:26]:
<["taskB", "main", "taskA", "task2", "main", "task1"]> expected but was
<["taskB", "taskA", "task1", "task2", "main", "main"]>.

[34/35] TC_Scoper#test_scope = 0.01 s
  2) Failure:
TC_Scoper#test_scope [/home/adam/.GIT/3rd-party/ansible-viz/test-scoper.rb:46]:
roleA taskA: missing/extra items.
<[[], []]> expected but was
<[["factB", "meow", "varAmaininc", "factAmain", "factB"], []]>.

Finished tests in 0.093157s, 375.7111 tests/s, 944.6451 assertions/s.
35 tests, 88 assertions, 2 failures, 0 errors, 6 skips

ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]
Coverage report generated for Unit Tests to /home/adam/.GIT/3rd-party/ansible-viz/coverage. 633 / 874 LOC (72.43%) covered.
aspiers commented 6 years ago

c7f7eaeeec introduced another failure:

[11/35] TC_Grapher#test_full = 0.01 s
  1) Error:
TC_Grapher#test_full:
TypeError: no implicit conversion of nil into String
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:97:in `quote'
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:97:in `block in decorate'
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:88:in `each'
    /home/adam/.GIT/3rd-party/ansible-viz/styler.rb:88:in `decorate'
    /home/adam/.GIT/3rd-party/ansible-viz/grapher.rb:26:in `graph'
    /home/adam/.GIT/3rd-party/ansible-viz/ansible-viz.rb:99:in `render'
    /home/adam/.GIT/3rd-party/ansible-viz/test-grapher.rb:20:in `test_full'
aspiers commented 6 years ago

Fixed regression in 35ec4b5

aspiers commented 6 years ago

There are also several other skipped tests.