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
Wojtek Porczyk
96efb4568a
core3: add different exceptions
...
From now on there are different exceptions which can be raise on
different occasions.
fixes QubesOS/qubes-issues#1279
2015-10-17 00:17:12 +02:00
Wojtek Porczyk
ea44c0acf3
qubes: pylint fixes
...
Fix bunch of errors and warnings.
2015-10-05 23:49:39 +02:00
Wojtek Porczyk
17ac6cb225
core3: boolean properties can be set explicitely
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
b4d51b016b
core3: some properties can be set only once
...
Some properties should not be changed by user at will (like UUID). The
solution is to make them write-once, so they will be set when loading
from XML and frozen for the lifespan of the object holding the property.
When desperately needed, users may edit XML by hand.
fixes QubesOS/qubes-issues#1235
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
12329e7b35
qubes/vm/qubesvm: fix log initialisation
2015-10-05 12:46:14 +02:00
Wojtek Porczyk
6241859dc8
qubes: Fix PropertyHolder.property_get_default
...
And test cases, some of them stubs.
2015-09-28 18:20:28 +02:00
Wojtek Porczyk
669a976d4e
qubes/tools: add common action for setting properties
2015-06-29 17:40:43 +02:00
Wojtek Porczyk
7f16e0a73b
qubes: disable events by default not to interfere with loading from XML
2015-06-29 17:39:28 +02:00
Wojtek Porczyk
d5f2e6ab74
qubes: rework qubes.xml handling
...
Now it more closely aligns with old core2 semantics. New semantics will
have to wait for qubesd.
2015-06-29 17:39:28 +02:00