Commit Graph

86 Commits

Author SHA1 Message Date
Marek Marczykowski-Górecki
12df07edd0 tests: invalid property should not be saved to qubes.xml 2016-04-07 13:03:42 +02:00
Marek Marczykowski-Górecki
c07981da88 tests: allow real prefix notation for selecting tests 2016-04-07 13:03:35 +02:00
Marek Marczykowski-Górecki
7f5feac98b qubes/vm: fixes for features handling
Properly handle 'None' value, there is no difference between empty
string (<x></x>) and no content at all (<x/>).
2016-04-07 13:03:30 +02:00
Marek Marczykowski-Górecki
06c315c94b qubes: fix/update event names
Fix few typos, then rename:
 - recreate-appmenus -> domain-restore: there may be more to do than
 only appmenus
2016-04-07 12:59:39 +02:00
Marek Marczykowski-Górecki
6052143735 tests: qvm-prefs
QubesOS/qubes-issues#1248
2016-04-07 12:57:57 +02:00
Marek Marczykowski-Górecki
43435405e7 tests: update checking 'None' VM representation 2016-04-07 12:57:47 +02:00
Bahtiar `kalkin-` Gadimov
b1978abce5 Use entry_points for pool driver discovery
- Add qubes.storage entry point to setup.py
- Removed the old pool driver class loading logic
- Reworked pool tests
2016-04-06 10:11:19 +02:00
Marek Marczykowski-Górecki
54784405bd tests: adjust networking tests 2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
34fe4a2d71 tests: add function to provide real network to test case
Very few tests should use it, as it makes the test result somehow
dependent on outside world state. But still, some of them need it.
2016-03-21 11:43:33 +01:00
Marek Marczykowski-Górecki
422f30b969 tests: port network tests to core3 API 2016-03-21 11:43:32 +01:00
Marek Marczykowski-Górecki
df5562d2c7 tests: fix rename test to report FAIL instead of ERROR when really failed 2016-03-21 11:43:32 +01:00
Wojtek Porczyk
394fa1e5d3 qubes/tests: tests for qubes.devices 2016-03-21 11:43:32 +01:00
Wojtek Porczyk
d09bd5ab6a qubes: Convert QubesVM and Extension discovery to pkg_resources
QubesOS/qubes-issues#1238
2016-03-21 11:43:32 +01:00
Wojtek Porczyk
93686eae06 qubes/vm: change services to features 2016-03-21 11:43:32 +01:00
Marek Marczykowski-Górecki
5dca051b32 tests: enable storage tests 2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
c0c0e0022e tests: convert storage tests to core3 API
QubesOS/qubes-issues#
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
14f31134c0 tests: move make_vm_name to QubesTestCase
This function is often useful also in unit tests, not only integration
tests.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
68ed50c97d tests: enable dom0 update tests 2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
fb74126e56 tests: convert dom0 update test to core3 API 2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
0307ec22f2 tests: resolve template name when copying from host collection 2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
81dbe3628f tests: skip system tests if not in dom0 2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
50819c726c tests: set QUBES_XML_PATH env variable to force usage of qubes-test.xml
This way even separate processes (even those started not directly - like
qrexec service calls) will use correct qubes.xml file.

Fixes QubesOS/qubes-issues#1730
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
79a6da1163 tests: split off invalid values tests for better reporting
Most of them fails for now...
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
c45c91c5f0 tests: improve verbosity of assertNotRaises even further
Include traceback in error message.
2016-03-03 01:18:17 +01:00
Marek Marczykowski-Górecki
5a409ad417 tests: few more (disabled for now) tests for hvm related properties 2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
1b69f5c213 tests: make test cleanup more defensive - qubes.xml load failure
If qubes.xml doesn't even load, remove it anyway and clean up the VMs
the hard way.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
9633573408 core: adjust units comment for host.memory_total, and fix related places
QubesOS/qubes-issues#1737
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
12941d67bf tests: do not unnecessary mangle test name passed as runner parameter
Otherwise `qubes.tests.run -l` output would not be useful as input for
test list.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
05d006b873 tests: minor fixes in int.tools tests 2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
163ab25d4b tests: enable qubes.tests.int.basic
It is fully converted to core3 API (or tests marked as 'skip' if not),
so can be reenabled.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
9b1b82c592 tests: move properties tests to QubesVM unit tests
Since qvm-prefs is now a generic tool without any property-specific
stuff, we can tests properties getters/setters in QubesVM class unit
tests.
Now most of properties are tested. Some of those tests still fails
because missing/incomplete underlying implementation.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
81bc615bce tests: convert tests/int/basic to core3 API
Not all tests converted - some of them will be removed in the next
commit. Also it doesn't mean that all tested functionality already
works...
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
2daba9e0eb core: migrate handy GUI functions and backup mixin from core2
That's all from tests/__init__.py, so remove that file.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
bc82643580 tests: redo "84af738 tests: support VMs cleaned up in tearDownClass..."
Usage: VMs with name created by self.make_vm_name(name,
class_teardown=True) will be cleaned up in tearDownClass. It
should be used only in setUpClass.

Fixes QubesOS/qubes-issues#1691
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
0a45164be7 tests: few more FD leak fixes
QubesOS/qubes-issues#1697
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
47e346efbf tests: initialize Qubes() object in SystemTestsMixin, add handy helpers
Most of the tests needs existing template, so add helper to copy it from
"host" collection. Add also helpers to reload qubes.xml - in case of
modification of it from some other process.
2016-03-03 01:18:16 +01:00
Marek Marczykowski-Górecki
2966456387 tests: improve assertNotRaises reporting
Include whole exception value, not only its type.
2016-03-03 01:18:16 +01:00
Wojtek Porczyk
9eafa57539 Merge remote-tracking branch 'marmarek/master' into core3-devel
The following list is bollocks. There were many, many more.

Conflicts:
    core-modules/003QubesTemplateVm.py
    core-modules/005QubesNetVm.py
    core/qubes.py
    core/storage/__init__.py
    core/storage/xen.py
    doc/qvm-tools/qvm-pci.rst
    doc/qvm-tools/qvm-prefs.rst
    qubes/tools/qmemmand.py
    qvm-tools/qvm-create
    qvm-tools/qvm-prefs
    qvm-tools/qvm-start
    tests/__init__.py
    vm-config/xen-vm-template-hvm.xml

This commit took 2 days (26-27.01.2016) and put our friendship to test.
    --Wojtek and Marek
2016-03-03 01:13:51 +01:00
Wojtek Porczyk
638c31ce68 qubes/tests/vm/qubesvm: some more tests 2016-01-21 13:31:43 +01:00
Wojtek Porczyk
06cc064c8c qubes/tests: split init to init1 and init2
This is to keep the correct order of the tests. The exact dependency
graph is somewhat complicated and contains several cycles.
2016-01-21 13:31:43 +01:00
Wojtek Porczyk
689dd64b0d qubes: misc pylint fixes 2015-12-29 22:04:00 +01:00
Wojtek Porczyk
bf4dbe07d5 qubes/tests/vm/qubesvm: add basic tests for QubesVM
And already one fix to instantiation.
2015-12-29 20:35:04 +01:00
Wojtek Porczyk
66475e5ca7 qubes/tests/run: Fix running foregin TestCases
This is needed, because when tests fail to load, unittest module
generates artificial „LoadTestsFailure” class -- not based on our
QubesTestCase, so it does not have .log attribute.
2015-12-29 20:08:47 +01:00
Wojtek Porczyk
13b1a7201a qubes/tests: fix tearing down QubesTestCase 2015-12-29 16:49:17 +01:00
Wojtek Porczyk
ce0b927a98 qubes/tests/int/tools/qvm_run: add tests for qvm-run
Missing is test for --gui/--no-gui.

part of QubesOS/qubes-issues#1226
2015-12-29 03:50:35 +01:00
Wojtek Porczyk
f1a0b1af39 qubes/tools: add qvm-run, qvm-{,un}pause
Also change convention of calling main(): now command returns its
numeric value instead of bool.

Also fixed QSB#13

fixes QubesOS/qubes-issues#1226
2015-12-29 03:43:08 +01:00
Wojtek Porczyk
ec50a411fe qubes/tests/int/tools/qubes_create: fix wrong assert 2015-12-23 14:34:54 +01:00
Wojtek Porczyk
5c57b4cda7 qubes/tests: fix regression in test setup
Regression was caused by 648fe213 "core3: test fixing"
2015-12-23 14:34:54 +01:00
Wojtek Porczyk
0dc0fd306f core3: test fixing
part of QubesOS/qubes-issues#1248
2015-12-23 14:34:53 +01:00
Wojtek Porczyk
dc3fcc3141 qubes/tests: port again the backported test runner
part of QubesOS/qubes-issues#1248
2015-10-17 00:20:44 +02:00