summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* ut: fix upgrade_test.pyAles Kozumplik2011-08-091-1/+1
| | | | should have been a part of c3bedc8c5b1542e882824d5fb4005f6336e7822a.
* ut: product_test.py should not fail if executed by itself.Ales Kozumplik2011-08-051-7/+3
| | | | | | Do the sys.modules magic in setup and be mindful. Also see ca27378ad0229c66c3bbcbd6636f2e555c2d6db8.
* Annotate the list of what pylint warnings and errors we ignore.Chris Lumens2011-08-011-5/+43
| | | | | This is the first step in seeing which we really need to ignore, and which we were just ignoring out of convenience.
* Disable E1103 (the "some types could not be inferred" message).Chris Lumens2011-08-012-6/+1
| | | | | We hit this for every use of a pyanaconda.product value, so it's really just noise.
* Delete the Mocked pyanaconda.product to fix product tests.Chris Lumens2011-08-011-0/+6
| | | | | | | | | | | Since anaconda modules are such a tangle, running one of the earlier tests causes pyanaconda.product to get imported early. On that import, it gets created as a Mock object, so the later import doesn't do anything useful and all the product tests will therefore fail. If we delete and then re-import, everything will work. This is only seen if you run everything in tests/, not if you just run the product_test.py by itself.
* Fix import errors in the unit tests.Chris Lumens2011-08-012-13/+13
|
* Remove the booty unit tests.Chris Lumens2011-08-015-551/+1
| | | | | Since all the bootloader stuff has been rewritten, it seems easier to write new bootloader tests from scratch instead of adapting what we've got.
* We also need to catch ValueError on mock.disk.TestFile.__del__.Chris Lumens2011-08-011-1/+1
|
* dispatcher: allow requesting a step without insisting.Ales Kozumplik2011-07-281-0/+12
| | | | | | | | Introduces Dispatcher.request_steps_gently() which requests steps if they are not skipped already (i.e. "Unless there is a compelling reason, like a kickstart command, not to run this step, it must be run."). Resolves: rhbz#723798
* edd: fix syntax in situation when two edd directories point to the same device.Ales Kozumplik2011-07-281-0/+29
| | | | | | Adds a unit test for this case. Resolves: rhbz#725777
* ut: cleanup the taking-over-io mechanism.Ales Kozumplik2011-07-273-49/+41
| | | | | | 1) Move the functionality from mock.DiskIO to mock.TestCase itself. 2) Use already existing mechanism (tearDownModules()) for cleaning up after we override functions in widely used modules.
* Fix broken unit tests (cmdline, network).Ales Kozumplik2011-07-271-22/+10
| | | | Related: rhbz#725757
* Change IsBeta to IsFinalMartin Gracik2011-07-261-5/+5
| | | | | | | When doing composes pungi (and lorax) uses a flag --isfinal, to set a final release, otherwise it is considered a beta release by default. This patch makes the final vs beta more consistent with the composes.
* edd: do not traceback with cciss devices.Ales Kozumplik2011-07-261-0/+17
| | | | Resolves: rhbz#723194
* edd: do not traceback when can not find the respective pci device.Ales Kozumplik2011-07-262-2/+24
| | | | Resolves: rhbz#723344
* There's no more booty module, so don't bother checking it.Chris Lumens2011-07-221-1/+1
|
* Ignore false positives in kickstart.py.Chris Lumens2011-07-221-0/+2
| | | | | These errors are incorrect because the attributes being complained about are set up by the callers.
* Ignore reimport warnings from pylint.Chris Lumens2011-07-221-1/+1
|
* changes needed to have per-connection ifcfg files for wifi connectionsVratislav Podzimek2011-07-181-28/+1
|
* edd: refactor and enhance the edd module.Ales Kozumplik2011-07-041-0/+133
| | | | | | | | | | | This strengthens the 'bios id' -> 'device name' mapping algorithm by looking at the pci device and interface properties specified in the edd data. Includes a unit test. Resolves: rhbz#621175 Related: rhbz#694800
* unit tests: provide 'glob.glob' and 'os.listdir' in the DiskIO class.Ales Kozumplik2011-07-041-9/+39
| | | | | | | | | Not a production code change. Just like the existing DiskIO, it is sufficient for the basic cases but breaks for more advanced ones. Related: rhbz#621175
* Keep dracut settings in sets instead of many long strings.Ales Kozumplik2011-06-242-6/+32
| | | | | | | This will avoid duplicities in the resulting kernel boot argument line. The patch is merged from the rhel6-branch and since bootloader.py has been overhauled the changes there are different.
* ut: remove trailing whitespace in language_test.pyAles Kozumplik2011-06-221-58/+58
|
* Implement an option that lets anaconda name mpath devices by the wwid.Ales Kozumplik2011-06-171-21/+73
| | | | | | | | | | | Adds a new option dialog to the filtering screen, with a checkbox. If user unchecks this, /etc/multipath.conf is generated with user_friendly_names set to "no". This will give all mpath devices names in the /dev/mapper/<wwid> format, partitions are /dev/mapper<wwid>p1. The setting defaults to using the friendly names. Resolves: rhbz#709653
* Unit tests cleanupsAles Kozumplik2011-05-236-502/+261
| | | | | | | | - make network_test, product_test, security_test, user_test and vnc_test pass - remove bootloader_test.py, it is of no use now after the rewrite. - remove trailing whitespace in network_test, product_test, users_test, security_test and vnc_test
* Remove trailing whitespace in file tests/mock/mock.py.Ales Kozumplik2011-05-231-31/+31
|
* ut: if _isys is not available dispatch_test and indexed_dict_test are failing.Ales Kozumplik2011-05-193-31/+41
| | | | | | Fix this as the other tests do: mock _isys. Part of the patch is fixing trailing whitespace in flags_test.py.
* ut: make pyanaconda_test/backed_test.py passAles Kozumplik2011-05-193-141/+128
| | | | | | | Some of those tests are not entirely useful but at least they shouldn't fail the suite. Also removes trailing whitespace from baseudev_test.py and desktop_test.py.
* dispatch: implement method of saving/restoring all steps scheduling.Ales Kozumplik2011-05-191-21/+83
| | | | | | | | | | | | | | | | Imagine this scenario, steps A, B and C are scheduled to be executed in that order. Based on a user's choice A decides to skip_step(B) and then the user presses "back" during C. This will take us back to A, but previously the state of step B would stay 'skipped'. Instead, it is desirable upon going back to have all the steps in the same scheduling state as they were when the original step was first entered. This patch addresses that by having each step store a dictionary of scheduling changes that happened during that step (a mapping from a step name to the tuple (from_state, to_state). It is therefore always possible to reconstruct the original state. Unittests included.
* ut: make upgrade_test pass.Ales Kozumplik2011-05-191-46/+46
|
* cosmetic: dispatch.skipStep is dispatch.skip_stepsAles Kozumplik2011-05-193-8/+8
| | | | Follow the same convention as the other dispatcher methods.
* dispatch: remove "upgradeswapsuggestion" and "addswap" steps.Ales Kozumplik2011-05-191-57/+0
| | | | | Those steps have been dead code since 2004, commit 724c8db86c39536b6c84eb5b1a845d5be5bae4c5.
* Throw away the dispatcher 'skipList' and give Step a state.Ales Kozumplik2011-05-191-0/+133
| | | | | | In particular, 'scheduled' will run if not explicitly skipped, 'skipped' means 'is never going to be run' and 'requested' means 'will run and can not be skipped'.
* IndexedDict class for storing the installer stepsAles Kozumplik2011-05-191-0/+39
|
* fix resuce_test.pyAles Kozumplik2011-05-041-99/+73
|
* Move most anaconda mount points to be under /mnt/install.Chris Lumens2011-04-131-9/+9
| | | | | | | /mnt/sysimage stays where it is because that's fairly widely established and known outside anaconda, whereas all these other mount points are private anaconda knowledge. /mnt/source is somewhat widely used, but I have cautioned people about getting used to that.
* Fixup upgrade test for findExistingRoots change (#681267)Brian C. Lane2011-03-011-7/+1
| | | | | Change to using findExistingRootDevices and remove find_existing_roots_test which no longer tests anything.
* Fix up tests for changes in split media handlingWill Woods2011-02-142-89/+14
| | | | | | | | | | | | Test fixups: - the mount command seems to get 'options':'' by default - mountImage/umountImage/verifyMedia no longer take discnum arguments Unneeded tests deleted: - anaconda_backend_get_required_media_test (used getRequiredMedia) - present_required_media_message_{1,2,3}_test (used getRequiredMedia) - find_iso_images_{1,2}_test (used findIsoImages) - get_disc_nums_{1,2,3}_test (used getDiscNums)
* Add new tests from the unittests branchTomas Mlcoch2011-02-1446-2/+6008
| | | | | | | This commit is part of a rebase of the unittests branch. It squashes ~40 commits together that were just adding and updating these new tests. (committed by Will Woods <wwoods@redhat.com>)
* Fix open method in mock/disk.py.Tomas Mlcoch2011-02-141-6/+11
| | | | Now is possible open empty file with mode 'a'
* Improve of mock/disk.py.Tomas Mlcoch2011-02-141-1/+16
| | | | | | | | Add __enter__() and __exit__() methods into TestFile class. Rename "IO" to "TestFile". Add destructor to TestFile and fix open mode "w". Add destructor to TestFile and fix open for write. Catch useless exception.
* Remove the old suite() crud from kickstart testing, python-nose work differenltyMartin Sivak2011-02-141-8/+1
|
* Tag tests as slow or acceptance tests and split full testing from devel unit ↵Martin Sivak2011-02-147-6/+32
| | | | testing
* Mock _isys and block modules in fw test. They are not needed.Martin Sivak2011-02-141-1/+1
|
* Add unit tests for storage.partitioning.getNextPartitionType.David Lehman2010-12-071-0/+130
| | | | | | The file partitioning_tests.py is intended to eventually contain a variety of other partitioning-related unit tests for things like allocation, alignment, and growing of partitions.
* Import as "pyanaconda.anaconda_log", not "anaconda_log".Chris Lumens2010-11-111-2/+2
| | | | | | | Doing the latter means both modules end up in the module list, which means you've got two different instances of the module and therefore two different instances of the module-level global logger. One will be initialized and one will not.
* Add pyanaconda/.libs to the PYTHONPATH for pylint.Chris Lumens2010-11-111-4/+5
| | | | | | | | | | This is to fix an error about not being able to import xutils when running under pylint. These fixes may seem a little arbitrary, but they're not. If the code says "import blah" where blah is a .so, we can add a directory to the PYTHONPATH. This is because blah.so will be in .libs/. If the code says "from pyanaconda import blah", then we need to apply another fix as the .libs/ directory is not involved.
* Ignore several false positives and import errors while running pylint.Chris Lumens2010-11-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | (1) I don't know why it tries to do this, but it always fails and causes the following: F0002: 1: <type 'exceptions.RuntimeError'>: could not open display (2) Also, this keeps coming up: E1101: 65:randomIname: Module 'hashlib' has no 'md5' member But I do not see how it's a valid bug: In [1]: import hashlib In [2]: m = hashlib.md5() In [3]: (3) Finally, there's this from several places: E0611: 26: No name '_isys' in module 'pyanaconda' This is not a bug because _isys.so is in .libs/, which will work just fine during runtime but is only a problem for pylint due to our "from pyanaconda import _isys" lines.
* Remove the parts required to make "make tests" work.Chris Lumens2010-11-116-27/+23
| | | | | | Since we're apparently using "make unittest" instead, make sure the other target simply doesn't work so there's no confusion. Also, add a Makefile.am to tests/pylint so that directory is included in the distributed sources.
* nosetests will only run tests if they are not executable and end in _test.py.Chris Lumens2010-11-115-0/+0
|