Wojtek Porczyk
a4d50409df
Merge remote-tracking branch 'marmarek/core3-storage-fixes' into core3-devel
2016-11-15 17:36:53 +01:00
Wojtek Porczyk
fd953f4f27
Merge remote-tracking branch 'marmarek/core3-backup2' into core3-devel
2016-11-15 17:34:12 +01:00
Marek Marczykowski-Górecki
b011cef8af
tests/storage: add tests for basic volumes properties
...
Things like if read-only volume is really read-only, volatile is
volatile etc.
QubesOS/qubes-issues#2256
2016-11-04 14:18:56 +01:00
Marek Marczykowski-Górecki
673fe4423a
tests: handle LVM thin pool
2016-10-28 11:53:31 +02:00
Wojtek Porczyk
5e62d3f7cb
qubes/tests: substitute_entry_points
...
New context manager for temporary overriding entry point groups.
fixes QubesOS/qubes-issues#2111
2016-10-24 15:16:39 +02:00
Wojtek Porczyk
8097da7cab
Paint the project green for testbench launch
2016-10-18 19:07:20 +02:00
Marek Marczykowski-Górecki
36eb7f923f
qubes/tarwriter: add simple sparse-tar writer module
...
tar can't write archive with _contents_ of block device. We need this to
backup LVM-based disk images. To avoid dumping image to a file first,
create a simple tar archiver just for this purpose.
Python is not the fastest possible technology, it's 3 times slower than
equivalent written in C. But it's much easier to read, much less
error-prone, and still process 1GB image under 1s (CPU time, leaving
along actual disk reads). So, it's acceptable.
2016-10-05 01:54:41 +02:00
Marek Marczykowski-Górecki
e938aa61ab
tests: cleanup test LVM volumes
...
Handle the case when vm.remove_from_disk does not cleanup all the
things.
2016-09-29 02:08:30 +02:00
Marek Marczykowski-Górecki
e499b529ad
tests: move BackupTestMixin to qubes.tests.int.backup
...
This is much more logical place, don't pollute main qubes.tests module.
2016-09-25 16:31:31 +02:00
Marek Marczykowski-Górecki
d4f29bb8b7
qubes: add qvm-firewall tool
...
Fixes QubesOS/qubes-issues#1815
2016-09-19 20:36:32 +02:00
Marek Marczykowski-Górecki
1da75a676f
qubes/firewall: new firewall interface
...
First part - handling firewall.xml and rules formatting.
Specification on https://qubes-os.org/doc/vm-interface/
TODO (for dom0):
- plug into QubesVM object
- expose rules in QubesDB (including reloading)
- drop old functions (vm.get_firewall_conf etc)
QubesOS/qubes-issues#1815
2016-09-19 20:36:30 +02:00
Marek Marczykowski-Górecki
e8d011b83f
qubes/tools: add qvm-device tool (and tests)
...
Add a tool to manipulate various devices.
QubesOS/qubes-issues#2257
2016-09-03 20:41:05 +02:00
Marek Marczykowski-Górecki
6aae6863b0
tests: load qubes.tests.tools.qvm_ls
...
The test module was implemented, but not loaded
2016-09-03 20:41:04 +02:00
Marek Marczykowski-Górecki
fbb086aed5
tests: PCI devices tests
...
Just basic things for now.
QubesOS/qubes-issues#2257
2016-09-03 20:41:04 +02:00
Marek Marczykowski-Górecki
d7a3c0d319
qubes: new devices API
...
Allow device plugin to list attached and available devices. Enforce
at API level every device being exposed by some domain.
This commit only changes devices API, but not update existing users
(pci) yet.
QubesOS/qubes-issues#2257
2016-09-03 20:40:39 +02:00
Marek Marczykowski-Górecki
d8286b6dab
tests: port vm_qrexec_gui to core3 API
2016-08-17 22:41:57 +02:00
Marek Marczykowski-Górecki
e19df4c5b6
tests: port dispvm tests to core3 API
...
Some tests do not apply, as there is no savefile and attributes
propagation is much simpler. Dropped tests:
- test_000_firewall_propagation
- test_001_firewall_propagation
- test_000_prepare_dvm
QubesOS/qubes-issues#2253
2016-08-17 04:15:35 +02:00
Marek Marczykowski-Górecki
660c726315
tests: add qvm-check
2016-08-09 05:14:13 +02:00
Marek Marczykowski-Górecki
ac68ffe39f
tests: correctly compare DeviceManager objects
...
Usefull for assertEqual(vm1.devices, vm2.devices) - clone tests, backup
tests etc.
2016-08-09 05:14:11 +02:00
Marek Marczykowski-Górecki
7d1cbd6934
tests: handle per-template tests in BackupTestsMixin
2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
fba6eac07f
qubes/tests: do not undefine libvirt domain twice
...
Do not access vm.libvirt_domain after it being already removed - this
will redefine it again in libvirt, just to undefine it in a moment.
On the other hand, few lines below there is fallback libvirt cleanup, in
case of proper one not working.
2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
6d45b97357
tests: workaround 'int' name being shadowed by module name
...
qubes.tests.int shadows 'int' type in qubes.tests module.
QubesOS/qubes-issues#2241
2016-08-09 05:14:09 +02:00
Marek Marczykowski-Górecki
4e022382a5
Merge remote-tracking branch 'origin/master' into core3-devel
2016-08-08 00:11:46 +02:00
Bahtiar `kalkin-` Gadimov
7d11a7afbd
Add lvm tests
2016-08-03 02:57:41 +02:00
Bahtiar `kalkin-` Gadimov
61feb0ced7
Migrate backup to new storage api
2016-07-13 22:34:37 +02:00
Wojtek Porczyk
6ade5736d7
pylint fixes
2016-06-10 21:27:29 +02:00
Marek Marczykowski-Górecki
98115eb541
tests/backup: fix to core3 API - there is no verbose= argument
2016-06-02 13:08:03 +02:00
Wojtek Porczyk
786884ad7a
qubes: fix netvm properties and tests
...
fixes QubesOS/qubes-issues#1816
2016-05-19 03:02:23 +02:00
Wojtek Porczyk
63c09a090c
qubes: Combat import cycles
...
This commit eliminates import statements happening in the middle of the
file (between two classes definition). The cycles are still there. The
only magic module is qubes itself.
2016-05-05 14:33:09 +02:00
Bahtiar `kalkin-` Gadimov
7200e6153b
Rename default storage driver from xen to file
...
- Rename XenPool ⇒ FilePool
- Rename XenVolume ⇒ FileVolume
2016-04-30 20:42:46 +02:00
Bahtiar `kalkin-` Gadimov
e3ae6cdc1b
BackupTestsMixin.create_backup_vms uses volumes
...
Instead of using root_img to access the path it uses now the proper volumes
2016-04-25 07:17:20 +02:00
Marek Marczykowski-Górecki
a707840596
tests: fix and enable external tests loader
...
QubesOS/qubes-issues#1800
2016-04-20 02:26:16 +02:00
Marek Marczykowski-Górecki
a1575b98d4
tests: do not drop 'qubes.tests.' prefix
...
This cause troubles with "external" tests (loaded from outside of
qubes.tests module).
2016-04-20 02:25:56 +02:00
Marek Marczykowski-Górecki
8c6fe7ed90
Merge remote-tracking branch 'origin/master' into core3-devel-mm
2016-04-11 13:03:12 +02:00
Marek Marczykowski-Górecki
20d53fbf69
tests: more VMs combinations in backup
...
VM with custom template, non-default NetVM
This requires to VMs being removed in reversed order (to first remove
VM, then its template).
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
c55ca8004a
tests: port backupcompatibility to core3 API
2016-04-07 13:21:00 +02:00
Marek Marczykowski-Górecki
44eed25511
tests/backup: report failure when error was expected but none detected
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
3342f637f4
backup: convert logging to proper python logging API
...
QubesOS/qubes-issues#1213
QubesOS/qubes-issues#1214
2016-04-07 13:20:59 +02:00
Marek Marczykowski-Górecki
019678bf4d
tests: fix backup test to not break default template...
...
By default AppVM is template based. This means vm.root_img points at
default template's root image. Change this to StandaloneVM to have
independent root.img.
2016-04-07 13:06:25 +02:00
Marek Marczykowski-Górecki
e557fe9989
backup: restructude the code into classes
...
Introduce two main classes Backup and BackupRestore for storing the
state of the desired operation. Then a simple interface to adjust
parameters.
(Almost) no functional change.
QubesOS/qubes-issues#1213
QubesOS/qubes-issues#1214
2016-04-07 13:06:14 +02:00
Marek Marczykowski-Górecki
e0686e1e02
backup: initial conversion to core3 API
2016-04-07 13:05:25 +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
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
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
Marek Marczykowski-Górecki
5dca051b32
tests: enable storage tests
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
0307ec22f2
tests: resolve template name when copying from host collection
2016-03-03 01:18:17 +01:00