pykickstart unit tests … follow-up

Just a quick follow-up and thanks to all who participated in the pykickstart unit test event. The list of participants leading up to and during the event includes clumens, alindebe, fcami, adamwill, pfrields, leitz and more (please correct if I’ve left anyone out).

Chris Lumens has incorporated much of the work already into a new pykickstart package. The pykickstart built-in test suite is maturing …

# git://git.fedorahosted.org/pykickstart.git ; cd pykickstart
# make test
*** Running unittests ***
PYTHONPATH=. python tests/baseclass.py -v
runTest (version.StringToVersion_TestCase) ... ok
runTest (version.versionFromFile_TestCase) ... ok
runTest (version.returnClassForVersion_TestCase) ... ok
runTest (version.VersionToString_TestCase) ... ok
runTest (timezone.FC3_TestCase) ... ok
runTest (timezone.FC6_TestCase) ... ok
runTest (monitor.F10_TestCase) ... ok
runTest (monitor.FC6_TestCase) ... ok
runTest (monitor.FC3_TestCase) ... ok
runTest (device.F8_TestCase) ... ok
runTest (device.FC3_TestCase) ... ok
runTest (mediacheck.FC4_TestCase) ... ok
runTest (autopart.FC3_TestCase) ... ok
runTest (autopart.F9_TestCase) ... ok
runTest (interactive.FC3_TestCase) ... ok
runTest (updates.F7_TestCase) ... ok
runTest (keyboard.FC3_TestCase) ... ok
runTest (autostep.FC3_TestCase) ... ok
runTest (clearpart.FC3_TestCase) ... ok
runTest (vnc.FC6_TestCase) ... ok
runTest (vnc.F9_TestCase) ... ok
runTest (vnc.FC3_TestCase) ... ok
runTest (firstboot.FC3_TestCase) ... ok
runTest (logvol.RHEL5_TestCase) ... ok
runTest (logvol.F9_TestCase) ... ok
runTest (logvol.FC3_TestCase) ... ok
runTest (logvol.FC4_TestCase) ... ok
runTest (rootpw.F8_TestCase) ... ok
runTest (rootpw.FC3_TestCase) ... ok
runTest (skipx.FC3_TestCase) ... ok
runTest (selinux.FC3_TestCase) ... ok
runTest (authconfig.FC3_TestCase) ... ok
runTest (lang.FC3_TestCase) ... ok

----------------------------------------------------------------------
Ran 33 tests in 8.315s

OK

Want to get involved…

There are still quite a few more kickstart commands needing tests. If you would like to get involved, I’ve outlined a few steps to contributors …

  1. Checkout the pykickstart development tree:
    # git://git.fedorahosted.org/pykickstart.git ; cd pykickstart
  2. Choose an unimplemented kickstart command from the table below. I’ve organized the commands by difficulty. The more difficult commands are the ones that have changed frequently over time and accept different arguments between versions.
    Less complex deviceprobe.py, displaymode.py, dmraid.py, driverdisk.py, iscsiname.py, key.py, lilocheck.py, logging.py, multipath.py, rescue.py, services.py, volgroup.py, zfcp.py
    Moderate ignoredisk.py, iscsi.py, langsupport.py, method.py, mouse.py, reboot.py, upgrade.py, user.py, zerombr.py,
    More Involved bootloader.py, firewall.py, repo.py, partition.py, xconfig.py, raid.py, network.py

    Already created?

    Over the next few days/weeks, we’ll be adding test cases. Before you start writing a new test, please check the pykickstart git repo to see if the test exists.
  3. Once you select a test to write, reference an existing test for an idea how to get started. For example … checkout the autostep test.
  4. Run your tests by typing:
    # make test TESTSUITE=tests/commands/yourtest.py
  5. Once happy with the results … package up your changes and send them for review:
    # git add tests/commands/yourtest.py     # Add your test locally
    # git commit tests/commands/yourtest.py  # Commit your changes locally
    # git-format-patch origin                # Generate a patch
    # git-send-email --no-chain-reply-to \   # Email the patch
    --in-reply-to 1232731389.3647.308.camel@localhost.localdomain \
    --quiet --to kickstart-list@redhat.com *.patch

Happy testing!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s