theforeman/community-templates — pull request #38 by lzap (2013-12-20 15:46:18+00:00)
Title: Support for RHEL7 and automated kickstart testing

DO NOT MERGE

Yesterday I noticed there are couple of issues with RHEL7 PXE provisioning, at
least some kickstart commands need to be added. I am not there yet.

But as part of my work, I started with *community template unit testing*! I am
adding small minitest suite that validates all supported versions of
Fedoras/RHEL and clones using ksvalidator, which is obviously needed to run
these tests.

Currently we have issues I'd like to fix as part of this PR. Note some of those
errors are just warnings, that means Anaconda will not stop from provisioning,
but I noticed RHEL7 Anaconda is more strict and it is insisting on the %end
statements now. So I'd like to fix all of them.

```
$ ruby -Itest test/kickstart/provision_test.rb
MiniTest::Unit::TestCase is now Minitest::Test. From test/kickstart/provision_test.rb:5:in `

'
Run options: --seed 40402

...FF..FF...FF

Finished in 1.166976s, 11.9968 runs/s, 30.8490 assertions/s.

1) Failure:
TestKickstartProvision#test_centos_6 [test/kickstart/provision_test.rb:11]:
Expected "The following problem occurred on line 43 of the kickstart file:\n\nSection %packages does not end with %end.\n\n" to be empty.

2) Failure:
TestKickstartProvision#test_centos_7 [test/kickstart/provision_test.rb:11]:
Expected "The following problem occurred on line 43 of the kickstart file:\n\nSection %packages does not end with %end.\n\n" to be empty.

3) Failure:
TestKickstartProvision#test_rhel_6 [test/kickstart/provision_test.rb:11]:
Expected "The following problem occurred on line 20 of the kickstart file:\n\nUnknown command: key\n\nThe following problem occurred on line 42 of the kickstart file:\n\nSection %packages does not end with %end.\n\n" to be empty.

4) Failure:
TestKickstartProvision#test_centos_4 [test/kickstart/provision_test.rb:11]:
Expected "The following problem occurred on line 13 of the kickstart file:\n\nUnknown command: services\n\nThe following problem occurred on line 16 of the kickstart file:\n\nUnknown command: repo\n\nThe following problem occurred on line 17 of the kickstart file:\n\nUnknown command: repo\n\nThe following problem occurred on line 18 of the kickstart file:\n\nUnknown command: repo\n\n" to be empty.

5) Failure:
TestKickstartProvision#test_rhel_7 [test/kickstart/provision_test.rb:11]:
Expected "The following problem occurred on line 20 of the kickstart file:\n\nUnknown command: key\n\nThe following problem occurred on line 42 of the kickstart file:\n\nSection %packages does not end with %end.\n\n" to be empty.

6) Failure:
TestKickstartProvision#test_rhel_4 [test/kickstart/provision_test.rb:11]:
Expected "The following problem occurred on line 13 of the kickstart file:\n\nUnknown command: services\n\nThe following problem occurred on line 15 of the kickstart file:\n\nUnknown command: repo\n\nThe following problem occurred on line 16 of the kickstart file:\n\nUnknown command: repo\n\nThe following problem occurred on line 17 of the kickstart file:\n\nUnknown command: repo\n\nThe following problem occurred on line 20 of the kickstart file:\n\nUnknown command: key\n\n" to be empty.

14 runs, 36 assertions, 6 failures, 0 errors, 0 skips
```