Commit Graph

330 Commits

Author SHA1 Message Date
Cole Robinson
3ea9a96961 tests: pylint: Silence some false positives
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-07-04 18:05:27 -04:00
Cole Robinson
1afdc7ae32 createvm: Rework to track all Guest/Installer params explicitly
Rather than build a guest and installer instance depending on where
we are in the UI, track each input property in an explicit class, so
we can rebuild the guest/installer on demand with data accumulated
up to that point.

This makes the flow easier to follow and simplifies a lot of hacks we
have to do when backing up through the wizard, because we are trying
to unwind changes from an existing object, rather than just blowing
it away and easily reassembling it with updated info.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson
eb605cccd8 tests: uitests: More createvm testing
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson
01eb65bd61 tests: Don't report UID/GID in fake caps data
Otherwise uitests can have different behavior depending on host state

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-05 19:39:45 -05:00
Cole Robinson
5c64d35756 tests: uitests: Add a NewVM failure test
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson
c0c69b1708 tests: uitests: Make NewVMManual more robust
There's a timing issue with changing pages

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-02-03 07:05:11 -05:00
Cole Robinson
ac202f40ac tests: uitests: Fix live hotplug test after delete rework
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-29 06:44:41 -05:00
Cole Robinson
4f7e25e9fe uitests: Fix with latest delete wizard
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-28 11:39:14 -05:00
Cole Robinson
e784376699 tests: Rename all test files to have test_ prefix
This will help for a possible future conversion to pytest

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-27 06:57:37 -05:00
Cole Robinson
78c8aef75e tests: Move all data directories to data/
This cleans up the file hierarchy a bit

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-27 06:57:37 -05:00
Cole Robinson
ba24d877bf createvm: Remove 'Network boot (PXE)', add 'Manual install'
For the dialog flow, these options are the same, the only effect
is that there's no longer an initial network boot phase.

PXE is dependent on an external server setup that is not common
in the scheme of things, so giving it a first class option on the
front of the new VM wizard isn't really sensible. Users that want
to PXE boot can easily do so via the 'customize before install'
option, or just manually create a VM and edit the boot device as
they see fit.

Explicitly advertising a Manual option is nicer for users that
just want to create a VM and deal with install later, among many
other minor use cases.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
18358d5096 tests: uitests: Make find() exception output nicer
Overwrite the internal exception, which is not interesting

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
f073ad6fb6 createvm: Remove kernel/initrd/dtb/kernel args UI
Add an info message that these can be set via the
'Customize before install' option. Duplicating this doesn't add a ton
of value here IMO

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
c92c454fde virtManager: Drop interface list for bridge and macvtap
Some related bits were discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

macvtap is problematic for inexperienced users so we shouldn't
be broadly advertising it, plus our device listing was incomplete
anyways.

Both bridge and macvtap device listing are largely dependent on
the libvirt virInterface APIs, which have varying degrees of
completeness across distros and are not particularly reliable to
begin with.

Drop both of these in favor of the available support for manually
specifying a device name

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
66e1eb7324 netlist: Add 'Macvtap device...' manual entry
Similar to the bridge option. We will be removing the explicit
device listing support soon, so this will be required for specifying
a macvtap device

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
00da972b14 netlist: Rename 'Specify shared device' to 'Bridge device...'
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
227d6982ae virtManager: Drop macvtap 'source mode' UI
Some related bits were discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
  * macvtap is kinda problematic in general because it doesn't provide
    out of the box host<->guest communication, and it requires a
    special XML option just to get working ipv6. Users that know they
    want it usually know this distinction, but if someone chooses it
    without understanding the implications it can cause confusion.
    This puts it hovering the intermediate/advanced user line which
    makes me want to not advertise it as prominently as we currently do,
    with an explicit list of host interfaces
"""

Part of this is that the only source_mode that will work in a useful
way for the vast majority of users is mode=bridge. Any of the other
modes either require special hardware, permissions, or other
configuration. Default to bridge mode. The XML editor is there for
anyone that knows they need something different

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
4c3c53f773 virtManager: Remove network portgroup UI
portgroups are a way to group logical chunks of settings inside
a <network> object. They are a quite advanced feature that I expect
many few users are using, and the ones that are using it are certainly
advanced enough to edit the XML directly.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:34 -05:00
Cole Robinson
4fce7dde9a virtManager: Remove LXC idmap UI
This is pretty obscure, and requires a large amount of UI surface
to handle correctly. Users can use the XML editor if they know they
need or want this.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:32 -05:00
Cole Robinson
137b73df75 virtManager: Only allow editing disk bus for new VM
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: bus editing: maybe keep this for the customize wizard, but
it should go away for existing disks, changing it for an existing VM is
definitely a 'shoot yourself in the foot' type of thing for most users
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:39:18 -05:00
Cole Robinson
7547905d79 virtManager: Remove max memory UI and memory hotplug support
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug
operations. These have been in the UI forever but I'm not sure people
actually use them. cpu hotplug has always been a mess, and unless the
user plans ahead by setting a high maxmem value ballooning is only good
for reducing memory. These all sound like advanced usage to me that
just confuses the typical usecase of adding more mem or vcpus to an
offline VM. And the hotplug operations with virsh are simple to invoke.
So I'd like to drop this from the UI
"""

The remaining field sets both max and current memory in the
inactive XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:24:22 -05:00
Cole Robinson
0335c9ce62 virtManager: Remove maximum VCPUS API and VCPU hotplug
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* UI maxmem and maxcpu notions, and related memballoon and cpu hotplug
operations. These have been in the UI forever but I'm not sure people
actually use them. cpu hotplug has always been a mess, and unless the
user plans ahead by setting a high maxmem value ballooning is only good
for reducing memory. These all sound like advanced usage to me that
just confuses the typical usecase of adding more mem or vcpus to an
offline VM. And the hotplug operations with virsh are simple to invoke.
So I'd like to drop this from the UI
"""

The remaining UI field now sets both maximum and current VCPU
allocation.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:24:20 -05:00
Cole Robinson
b4b497e28f virtManager: Remove network virtualport UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* network virtualport configuration: this is some really obscure
stuff for configuring VEPA for macvtap devices. I don't think it gets
any usage in practice. I think a smaller subset of this UI is shared
with openswitch config but I believe it's just a single field, we
could keep that even though I don't think many people use it either
"""

This removes it all. The openvswitch piece was not properly wired
up anyways, since it requires setting virtualport type for a bridge.
For users that know they need that, they can add it via the XML
editor.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:22:18 -05:00
Cole Robinson
3c861131dd virtManager: error: Break long lines in error dialogs
Errors from libvirt can be super long, and stretch out the dialog like
crazy.

This causes some changes in test suite output, so adjust tests to
match

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-26 11:21:59 -05:00
Cole Robinson
a162a3b845 virtManager: Remove disk driver_io UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

The default driver_io value we use seems to be sufficient. It's very
rare to hear that users need to change the value to something
different, and if they do, they are advanced enough users that can
edit the XML directly IMO.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson
79fe886ac8 virtManager: Remove disk format/driver_type UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: storage format: this was from before the days when we
storage-ified everything and we could get the disk format wrong, telling
qemu it has a raw image when it's qcow2. shouldn't be needed anymore for
normal virt usage
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 14:30:07 -05:00
Cole Robinson
1066867583 virtManager: Remove disk serial UI
This was proposed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

"""
* disk: serial: I know this is useful in some cases but seems quite
obscure. I think the XML editor is fine unless there's some common
usecase I'm missing
"""

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-25 13:45:43 -05:00
Cole Robinson
bd82ef6529 virtManager: Remove spice tlsport UI
This was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

tlsPort is an advanced config feature. With the XML editing support,
it's less important to have this as a first class UI element. Users
that know they need this setting can set it directly in the XML

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
7251ea25c2 virtManager: Remove graphics keymap UI
Removing this was discussed here:
https://www.redhat.com/archives/virt-tools-list/2019-June/msg00117.html

For a decade, qemu and xen and virt-manager work together to
make setting a manual keymap redundant. Advertising it in the UI does
more harm than good, because users may think they need to specify
one when in the vast majority of cases it will give worse behavior.

With the XML editing UI, users still have a way to do this by hand
if they really know what they are doing.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 17:04:29 -05:00
Cole Robinson
670e2fe11a tests: uitests: Fix for latest storage delete changes
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2020-01-24 15:39:41 -05:00
Cole Robinson
0e9905d057 uitests: Fix memory hotplug test with latest libvirt
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2019-11-12 14:23:08 -05:00
Cole Robinson
aaa065d38e createpool: Add more coverage testing 2019-07-03 19:37:01 -04:00
Cole Robinson
616a7f2dd5 createpool: Simplify LVM volume group UI
Only show the volgroup name, and nothing else, which is all mostly
extraneous

https://bugzilla.redhat.com/show_bug.cgi?id=1316977
2019-07-03 19:37:01 -04:00
Cole Robinson
e4b4834a58 uitests: newvm: More attempts to make the PXE test less flakey 2019-06-18 10:01:26 -04:00
Cole Robinson
f107e39989 Switch to more traditional logging structure
Init a shared log instance in virtinst/logger.py, and use that
throughout the code base, so we aren't calling directly into
'logging'. This helps protect our logging output from being
cluttered with other library output, as happens with some
'requests' usage
2019-06-17 00:12:31 -04:00
Cole Robinson
fe0e36499b uitests: prefs: Another attempt to fix XML editor flakiness 2019-06-16 19:33:45 -04:00
Pavel Hrdina
d6b6397ce0 virtManager: xmleditor: warn when switching to XML tab
If there are unapplied changes in the UI warn user when they tries to
switch to XML editor.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-06-15 15:05:28 +02:00
Cole Robinson
b9981b4623 createpool: Drop disk and netfs pool source listing
Both of these are awkward to use and IMO not really useful.
2019-06-14 17:16:48 -04:00
Cole Robinson
b4cc9c7cea uitests: Fix prefs XML editor flakeyness 2019-06-13 13:50:52 -04:00
Cole Robinson
2266b650a5 preferences: Disable XML editing by default
This adds a field in gsettings and preferences UI to enable
XML editing. It's off by default. The XML tab page is still visible,
but the textview is not editable, and there's a warning at the top:

  XML editing is disabled in 'Preferences'.
  Only enable it if you know what you are doing.

When the setting is enabled, the warning goes away and the textview
is editable. This puts a roadblock up for people that don't know what
they are doing, but still advertises the feature and keeps the
UI surface difference fairly small between on/off states.
2019-06-13 07:17:34 -04:00
Cole Robinson
2a1cf411dd tests: Add XML editing UI tests 2019-06-13 07:17:34 -04:00
Cole Robinson
078348fbbf create: move generate_name to Guest
This will be used by virt-install.
Tweak the logic a bit to not have 'generic' in the name
2019-06-11 17:54:45 -04:00
Cole Robinson
c9233aa6c3 tests: uitests: Run whole suite without testsuite hacks
We want to hit real network fetching, etc.
2019-06-09 14:26:03 -04:00
Cole Robinson
f3b0830cf3 tests: Add run_without_testsuite_hacks decorator 2019-06-08 09:11:00 -04:00
Cole Robinson
d65f54dc9d uitests: Enable accessibility if it's turned off 2019-06-05 16:28:05 -04:00
Cole Robinson
09b0caec42 uitests: More work to fix newvm.py flakiness 2019-06-05 16:22:41 -04:00
Cole Robinson
3734148b8c uitests: Improve click() onscreen handling 2019-06-05 12:27:03 -04:00
Cole Robinson
85f5b18a08 uitests: Improve mediachange assertion check 2019-06-05 12:26:35 -04:00
Cole Robinson
aeff4e248f tests: Fix testsuite on non-latest libvirt
The memory hotplug changes only work on libvirt 5.3.0, among a few
other pieces. Still do the XML compare but skip domain define if
the new check_version_define comparison fails.
2019-05-15 20:19:58 -04:00
Cole Robinson
4141f5c79b createnet: Shrink to one page
Name and forward mode config are always visible. ipv4, ipv6, and
domain name are under their own expanders which are collapsed by
default.

This will fit better with the XML editor pattern and reduce the
urge to squeeze more UI elements into the now smaller wizard
2019-05-13 12:08:55 -04:00
Cole Robinson
5b0b90c33e createpool: Switch to a single page
Just combine the pages. This simplifies the code and navigation, and
makes it easier to add XML editing
2019-05-13 12:08:55 -04:00
Cole Robinson
ffe7be601b tests: uitests: Fix CPU model test
We need to use a fake domcaps URI after 95d1275f57
2019-03-26 11:43:12 -04:00
Cole Robinson
0c82a6b78c tests: uitests: Fix createpool with new libvirt collision checks 2019-03-06 13:46:24 -05:00
Cole Robinson
ef279273af virt-manager: add --show-domain-delete
Launches delete wizard on top of a VM window, so when domain is
deleted, VM window disappears and the whole app exits
2019-03-04 14:04:34 -05:00
Cole Robinson
91dd6739c6 uitests: Cover vsock UI 2019-01-08 12:08:56 -05:00
Cole Robinson
30448f3c81 tests: uitests: Add click() wrapper 2018-10-13 15:33:44 -04:00
Cole Robinson
2e6093d6b6 create: Show inserted CDROM media in customize
This makes it easier for people to change install media afterwards
if they want:

https://bugzilla.redhat.com/show_bug.cgi?id=1508377

But also this makes it more clear that if users want to use virtio-win,
they need to add an additional CDROM and not try to reuse the install
CDROM device
2018-10-13 10:17:50 -04:00
Cole Robinson
2482e57a15 create: Fix customize boot page
Installer reworks dropped the guest.autostart flag, need to add
it back. Add Uitest for it
2018-10-13 09:46:06 -04:00
Cole Robinson
4096800f71 Remove interface UI
Discussed here: https://www.redhat.com/archives/virt-tools-list/2018-October/msg00032.html
2018-10-12 14:38:05 -04:00
Cole Robinson
23d15d7ad1 uitests: Rename console->livetest.py
It has more than console tests. let's use it as the destination for
all live VM testing
2018-10-12 13:49:53 -04:00
Cole Robinson
2e467484bf uitests: Add rbdceph and qemu search perms tests 2018-10-12 13:49:53 -04:00
Cole Robinson
a1d1b4d5a0 engine: Drop PackageKit integration
On first run of the app we will check to see if libvirt and qemu
are installed, and if not, offer to install them. In theory anyways.
In practice this stuff breaks repeatedly and is a pain to test because
every desktop has their own API provider with subtly different behavior.

My last round of testing about 12 months ago: apper on KDE was completely
busted and apparently unmaintained (although that may have changed lately),
gnome-software is the latest packagekit provider on gnome and completely
changes the semantics of the API compared to old style gnome-packagekit
that break a lot of virt-manager assumptions.

So I'm tired of it and want it all gone. Still use systemd to try and
check if libvirtd is running, and provide error messages at startup
to guide people.
2018-10-07 14:24:05 -04:00
Cole Robinson
321ec81cb7 uitests: Add a test case for multiconnect
And the mediacombo behavior for that case
2018-10-06 20:37:33 -04:00
Cole Robinson
0638e72f1f Remove 'Choose CD', rework details and create media change
The new UI is handled in mediacombo. It's a combobox+entry. The
combobox is prepopulated with host cdrom/floppy devices, and
previously used media paths from gsettings

The new VM wizard no longer has separate UI for cdrom device vs
ISO media. The choosecd dialog is gone all together, and media
is changed with the 'apply' button like all other details changes
2018-10-06 19:37:16 -04:00
Cole Robinson
256bd2bcf8 uitests: console: fix fullscreen test on second monitor 2018-10-06 13:17:59 -04:00
Cole Robinson
9db3b5c7e5 ui: create: Drop lots of indentation
Makes better use of horizontal space
2018-10-02 10:26:04 -04:00
Cole Robinson
b19f94299b details: Add OS name view/edit, + oslist rework
This is just a big nasty commit.

Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
2018-09-30 20:55:32 -04:00
Cole Robinson
75c64151b1 engine: Exit app if if --show-X bits fail
We were missing some cases. Simplify the code while we are at it
and add some extra ui test cases
2018-09-30 20:55:18 -04:00
Cole Robinson
4adb1c8c30 pycodestyle: fix W605 invalid escape sequence 2018-09-29 13:59:19 -04:00
Cole Robinson
a09a46289a addhardware: Move controller list logic to virtinst
And tweak the UI defaults a bit, preferring virtio-scsi and
usb3
2018-09-06 16:05:12 -04:00
Cole Robinson
7994dc90c8 addhardware: Move video model list to virtinst
And make it smart about the hypervisor
2018-09-06 14:45:05 -04:00
Cole Robinson
b3865d7b0d addhardware: Drop tcp/udp/dev char support
I know openstack uses tcp consoles but for end users I've never
really heard about it. RHEL compiles out udp as well. I'm fine telling
users to go to the cli and use virt-xml for this use case.

Use this opportunity to drop a lot of code that only simplified the
case when there are tons of char options we need to consider
2018-09-06 13:28:21 -04:00
Cole Robinson
cd07d6af34 sound: Track recommended models in virtinst
Change addhardware to show an editable model entry, like the
details wizard
2018-09-06 13:28:21 -04:00
Cole Robinson
c5033c02d5 fsdetails: Use combo entry for format list
And stop listing all the crazy qemu formats
2018-09-06 13:28:21 -04:00
Cole Robinson
f13d10590d createvol: Only show raw+qcow2 as file formats
And turn the combo into a text entry, so users can enter their
own if they want. raw and qcow2 covers the vast majority of usecases
2018-09-06 13:28:21 -04:00
Cole Robinson
64dc334538 devices: interface: Add set_default function
Move all the Guest network default logic to it, and drop a now
redundant test
2018-09-04 14:55:04 -04:00
Povilas Kanapickas
3c62685bf1 uitests: Use Ctrl_L+Alt_L+Z as a grab keys when testing prefs
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:30:14 -04:00
Povilas Kanapickas
568a39f1ee uitests: Increase click offset for window drag
On KDE the testManagerWindowCleanup test clicks right on the border and
the drag operation fails, bringing down the test. Clicking a bit lower
fixes this issue.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:30:14 -04:00
Povilas Kanapickas
fb7b295e21 uitests: Fix selection of items in long menus that don't fit on screen
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:30:14 -04:00
Povilas Kanapickas
895668fa9a uitests: Fix onscreen to return True only when full widget is on screen
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:30:14 -04:00
Povilas Kanapickas
bf823fdb3c details: Pin network-model label directly to combo to simplify tests
This approach is used in majority of other places and allows the
combobox items to be selected directly instead of typing text in tests.

Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:17:19 -04:00
Povilas Kanapickas
c81d722a19 uitests: Improve robustness of click_combo_entry()
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:17:19 -04:00
Povilas Kanapickas
1f2b9b8342 uitests: Don't fail when requiested file is not visible
Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
2018-09-04 13:17:19 -04:00
Cole Robinson
10290cbf48 tests: uitests: Fix remote dbus test
My last patch broke it!
2018-09-04 13:17:19 -04:00
Cole Robinson
40461c58ef tests: uitests: Fail if virt-manager is already running
We don't want to connect to an existing app and possibly mess
up host state
2018-09-04 12:44:05 -04:00
Cole Robinson
83a9e613e9 tests: uitests: Fix breakage
Needs adapting to latest TPM addhw work, and armv7 UEFI support
2018-08-31 16:47:10 -04:00
Cole Robinson
d68305eaab tests: utils: Move all URI strings to URIs object
Non-functional change, just makes code org nicer
2018-06-12 14:07:50 -04:00
Stefan Weil
633534c8b8 Fix some typos in comments and documentation (found by codespell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2018-06-05 14:27:29 -04:00
Cole Robinson
28b3aca9fa tests: uitests: Fix with connect.py changes 2018-05-02 17:45:09 -04:00
Cole Robinson
d99e31cbc4 tests: uitests: newvm: Fix the rest with the oslist rework 2018-05-01 18:45:25 -04:00
Cole Robinson
ec407e8a06 tests: uitests: newvm: Fix import tests after oslist rework 2018-05-01 18:45:25 -04:00
Cole Robinson
e1f16e62b8 addhardware: Remove non-device RNG UI
This config is not common enough to warrant the large UI surface
2018-05-01 12:27:27 -04:00
Cole Robinson
3bc7ff24cf uitests: Use old Fedora URL in test suite
the centos URL is currently broken with latest urldetect, we need to
add some info to libosinfo to cover it
2018-04-26 09:50:57 -04:00
Cole Robinson
056305d29b addhardware: Make combo init/populating more consistent
* Use the _build_combo helper more
* Un-static methods that don't need it
* Use pretty labels more
2018-04-25 08:04:50 -04:00
Daniel P. Berrangé
48e32b429d Fix copyright header to specify GPLv2 or later, not GPLv2 only.
The copyright headers in every file were chjanged in this previous commit

  commit b6dcee8eb7
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Tue Mar 20 15:00:02 2018 -0400

    Use consistent and minimal license header for every file

Where before this they said "

  "either version 2 of the License, or (at your option) any later version."

Now they just say

  "GNU GPLv2"

This fixes it to say "GNU GPLv2 or later" again.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-04 16:51:37 -04:00
Cole Robinson
b238718347 tests: uitests: Omit /usr for coverage
like we do for regular test suite coverage
2018-03-21 16:25:07 -04:00
Cole Robinson
b6dcee8eb7 Use consistent and minimal license header for every file 2018-03-21 07:29:40 -04:00
Cole Robinson
4d4a07c65b tests: uitests: Add window cleanup tests
And fix some bugs I found as a result
2018-03-17 19:42:19 -04:00
Cole Robinson
591dda6d1e uitests: connect: Test double click to open 2018-03-17 18:46:40 -04:00
Cole Robinson
edc79a3272 uitests: Add VM 'doubleclick' open testing 2018-03-17 18:46:40 -04:00
Cole Robinson
b423d8ffe7 uitests: cli: test --connect with a bad URI 2018-03-17 18:46:40 -04:00
Cole Robinson
f5562e77ae tests: uitests: Make an addhw test less flakey 2018-03-15 21:24:48 -04:00
Cole Robinson
dabbc8d5bd engine: Remove centralized conn.open handling
Move connection opening logic to each caller, since needs are
slightly different.
2018-03-15 21:24:48 -04:00
Cole Robinson
1d17b98852 engine: Move most remaining window tracking to UI classes
Kind of a big mess but it was difficult to untangle piecemeal.
Basically this drops nearly all the centralized window tracking
in engine.py and moves it to each UI class. If manager.py wants
to open a details window it does it directly, and vmmDetails tracks
the window object list itself. This simplifies things and makes
the code easier to follow.

There's still some weirdness with vmmConnect and connection callbacks,
but future patches will break those apart.
2018-03-15 21:24:48 -04:00
Cole Robinson
c05cd52772 setup: Use CLIState for setting --debug value 2018-02-22 15:18:47 -05:00
Chen Hanxiao
a9596c7492 pylint: fix logging-too-few-args issue
From: Chen Hanxiao <chenhanxiao@gmail.com>

pylint complain:
  Not enough arguments for logging format string (logging-too-few-args)

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2018-02-13 16:42:29 +08:00
Cole Robinson
1550e70a4e uitests: Silence noisy harmless warnings
Could mean a code error but more likely is just slightly racy
UI bits disappearing that we weren't looking for anyways, so hide
it behind a debug statement
2018-02-08 14:23:11 -05:00
Cole Robinson
8e7b5ed2d8 Drop __future__ imports, no longer needed 2018-02-08 14:08:23 -05:00
Cole Robinson
f7c50ebe07 uitests: Add a test for command line errors 2018-01-21 14:42:44 -05:00
Cole Robinson
4a4207189f uitests: Add a live hotplug and media change test 2018-01-21 14:42:44 -05:00
Cole Robinson
ab36d429d6 console: Add a basic spice GL + usbredir test 2018-01-21 14:42:44 -05:00
Cole Robinson
808f9975aa uitests: xml: drop hardcoded emulator path 2018-01-21 14:42:44 -05:00
Cole Robinson
a10fda6b5c uitests: console: Add live lxc serial test 2018-01-21 14:42:44 -05:00
Cole Robinson
d774d01e1c uitests: Add live console tests
Using transient VMs connecting to real qemu:///system. uitests are
already system invasive so I think this is okay
2018-01-21 14:42:44 -05:00
Cole Robinson
2fdf0c7ebe uitests: prefs: Move helper functions to util 2018-01-21 14:42:44 -05:00
Cole Robinson
2bfd2f28c1 uitests: More details config tweaking 2018-01-21 14:42:44 -05:00
Cole Robinson
c68cd7bb00 uitests: Add details editing tests 2018-01-21 14:42:44 -05:00
Cole Robinson
d3137419d0 uitests: Add manager related tests 2018-01-21 10:02:08 -05:00
Cole Robinson
c87bb3937d uitests: Add dbus remote cli test 2018-01-21 10:02:08 -05:00
Cole Robinson
3ccb947ce3 uitests: Add choosecd dialog tests 2018-01-21 10:02:08 -05:00
Cole Robinson
a6c3fca7a7 uitests: Basic migration tests 2018-01-21 10:02:08 -05:00
Cole Robinson
a9ba930936 uitests: newvm: Add a customize->addhardware test 2018-01-21 10:02:08 -05:00
Cole Robinson
f1468cf1c7 uitests: addhardware error dialog tests 2018-01-21 10:02:08 -05:00
Cole Robinson
114cfb3479 uitests: addhardware controller tests 2018-01-21 10:02:08 -05:00
Cole Robinson
dc3c0b29f7 uitests: addhardware storage/disk testing 2018-01-21 10:02:08 -05:00
Cole Robinson
c620e7405c uitests: addhardware: add network tests 2018-01-21 10:02:08 -05:00
Cole Robinson
72f006ae8b utils: Have find 'name' match labeller text too
Simplifies API callers
2018-01-21 10:02:05 -05:00
Cole Robinson
d3b6df8e9a uitests: s/find_pattern/find/g 2018-01-19 11:05:23 -05:00
Cole Robinson
9232a51d55 uitests: Add a bunch of addhardware testing 2018-01-19 11:04:44 -05:00
Cole Robinson
be03382e25 uitests: Add snapshot tests 2018-01-18 16:56:07 -05:00
Cole Robinson
e7c822bf8f uitests: connect: Fix failure case to always fail 2018-01-15 09:57:33 -05:00
Cole Robinson
d8d71bddfb ui: Add createnet/pool/vol/interface tests 2018-01-11 21:02:34 -05:00
Cole Robinson
570ee90c4d uitests: Centralize object list smoketest handling 2018-01-11 10:27:48 -05:00
Cole Robinson
a4e1b64f1a uitests: Move helper functions into the Node wrapper class 2018-01-11 08:24:58 -05:00
Cole Robinson
9c4c9aeb8f uitests: Wait for windows to become 'active'
If we wait for windows to become active in the window manager before
we try to do any clickyclicky, this solves a lot of the race
conditions I was trying to work around widget by widget
2018-01-10 18:41:55 -05:00
Cole Robinson
8d7440fbde uitests: Add 'open connection' testing 2018-01-10 13:52:53 -05:00
Cole Robinson
dc344fc8ee error: Add accessible strings for error dialogs
Makes UI testing easier
2018-01-09 17:58:55 -05:00
Cole Robinson
09dd1596e2 uitests: Add preferences dialog tests 2018-01-09 17:41:20 -05:00
Cole Robinson
c073fc2a7e ui: about: Bump copyright year 2018-01-09 17:41:20 -05:00
Cole Robinson
7a12899b44 uitests: Add test for 'about' dialog 2018-01-09 17:41:20 -05:00
Cole Robinson
4b4f532417 uitests: Wire up --coverage
Need to launch the external coverage process to actually measure
things
2018-01-09 13:51:53 -05:00
Cole Robinson
b4a2c46f6a virt-manager: If --connect passed, wait for it to init
...before showing the UI. This helps the UI test suite be less
racy at least.
2018-01-09 13:51:53 -05:00
Cole Robinson
0c615497b1 uitests: Drop sleeps from newvm tests
Adds a few new uiutils options to facilitate watching for the expected
result, rather than depending on hardcoded sleeps
2018-01-09 13:51:53 -05:00
Cole Robinson
4fbffc4086 uitests: Drop redundant sleeps
All these cases have sleep+backoff built into the dogtail logic,
so we don't need to manually sleep
2018-01-09 12:04:49 -05:00
Cole Robinson
8030e0a35c uitests: Centralize app shutdown
Try a graceful shutdown, wait for app to respond, before trying SIGKILL.
2018-01-09 12:04:43 -05:00
Cole Robinson
acfd59f22b uitests: Split out UITestCase class 2018-01-09 10:06:26 -05:00
Cole Robinson
89945118df uitests: Make unittest.installHandler work as expected
And ctrl-c exiting in general.
2018-01-08 09:21:42 -05:00
Cole Robinson
10246e0caa tests: uitests: wire up --debug option 2017-10-21 19:41:33 -04:00
Cole Robinson
be7db97ecf uitests: launch UI with same python executable
As the tests were launched with
2017-10-21 19:41:33 -04:00
Cole Robinson
6b8f0b6e1a tests: uitests: Add a delay for nvram rename test
Seems to fail a bit otherwise
2017-09-15 19:42:40 -04:00
Cole Robinson
6f8206dc55 uitests: newvm: Fix after CPU UI tweaks 2017-07-20 17:54:11 -04:00
Cole Robinson
1e3e9a9fc4 uitests: Add 'host' window smoke tests 2017-07-20 17:27:22 -04:00
Cole Robinson
f551d7e55d Replace file() usage with open()
Same semantics, but the latter is needed for python3
2017-05-05 14:53:12 -04:00
Cole Robinson
55288c4551 Convert to python3 style print() syntax
Use __future__ imports to keep this working for python2
2017-05-05 14:52:37 -04:00
Cole Robinson
62feeb02a8 Switch to python3 style 'except X as Y' notation
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson
fcebefd3bb tests: Stop using deprecated assertEquals
The recommended way is assertEqual
2017-05-05 12:40:52 -04:00
Mikhail Feoktistov
3f59906af6 Add GUI test for Virtuozzo containers 2017-03-22 11:00:50 -04:00
Cole Robinson
e58b1fc95f uitests: Add details->rename tests 2017-03-08 13:22:09 -05:00
Cole Robinson
581e5b2ee8 uitests: Add clone wizard tests 2017-03-06 22:15:46 -05:00
Cole Robinson
ed92e03f39 tests: make test-clone VMs offline by default
Simplifies test cases
2017-03-06 22:15:46 -05:00
Cole Robinson
84d8cd9896 tests: Rename clone test VMs to have a common "test-clone" prefix 2017-03-06 22:05:35 -05:00
Cole Robinson
4c87b5e541 tests: uitests: Fix with git 2016-06-17 19:30:45 -04:00
Cole Robinson
182808f97b uitests: newvm: Fix CDROM test
Need to click the OS text entry to close the popup window
2016-05-17 18:01:47 -04:00
Cole Robinson
f4dfb6de9d Fix recent pylint/pep8 output 2016-04-18 16:42:12 -04:00
Cole Robinson
f7ae826f0a Fix some gi version errors from pylint 2015-12-06 15:41:49 -05:00
Cole Robinson
bb62a0f7a4 uitests: Add more install tests for arch/machine/virt handling 2015-09-14 19:27:55 -04:00
Cole Robinson
2fda875072 uitests: Check CPU value in a loop, for robustness 2015-09-14 19:26:26 -04:00
Cole Robinson
1e01395ad9 uitests: newvm: Add basic test case for xen paravirt 2015-09-14 17:01:32 -04:00
Cole Robinson
01da21b93a uitests: Add a basic details.py test
Checks all hw of test-many-devices and make sure an error isn't raised
2015-09-14 14:44:39 -04:00
Cole Robinson
cfd980611a uitests: Add check_in_loop helper function 2015-09-14 12:59:49 -04:00
Cole Robinson
3d9b3528e9 uitests: Separate static methods from DogtailApp 2015-09-14 12:55:04 -04:00
Cole Robinson
ddea18baf9 create: Cleanup of distro detection code
- Use better variable names
- Lots of comments
- Streamline various parts
2015-09-13 12:28:16 -04:00
Cole Robinson
0dc74d6409 uitests: Use Centos5.5 URL for tests instead of fedora
Modern fedora + initrd are much larger, so take longer to download
2015-09-13 12:15:11 -04:00
Cole Robinson
d9356025ff uitests: Always disable dogtail file logging, we never want it 2015-09-12 14:25:25 -04:00
Cole Robinson
8ffcfccb5c uitests: Fix them once again
The pylint fix broke things... apparently dogtail advertises one
function signature but then calls it without any arguments...
2015-09-12 14:25:25 -04:00
Cole Robinson
7773a045f8 uitests: Fix some pylint 2015-09-11 12:03:38 -04:00
Cole Robinson
420fd88af5 uitests: Use dogtail findChild, which does retrys and backoffs
Avoids some random timing failures
2015-09-10 18:23:10 -04:00
Cole Robinson
516f7faa5a uitests: Don't print virt-manager stdout 2015-09-10 17:39:57 -04:00
Cole Robinson
5c66328e10 uitests: Several more 'New VM' tests, and cli --show tests 2015-09-09 19:07:31 -04:00
Cole Robinson
91e2d502bb tests: Add test_ui target for dogtail UI tests, add an example 2015-09-09 14:26:50 -04:00