action #107026
coordination #109668: [saga][epic] Stable and updated non-qemu backends for SLE validation
coordination #100688: [epic][virtualization][3rd party hypervisor] Add svirt backend compatibility for vmware 7.0
Improve existing unit tests for VNC module to increase its test coverage (before doing any actual changes) size:M
0%
Description
Motivation¶
To be able to safely extend VNC which we plan for VMWare 7.0 support we need to cover consoles::VNC better with our test coverage
Acceptance criteria¶
- AC1: 100% reported statement coverage for consoles::VNC in our CI tests
- AC2: VNC protocol can be tested without sockets
Suggestions¶
- Extend the existing unit test https://github.com/os-autoinst/os-autoinst/blob/master/t/27-consoles-vnc.t
- Introduce uncoverable statements where it makes sense
- Split consoles::VNC into protocol and socket modules so that protocol is separated from networking in os-autoinst consoles::VNC
Related issues
History
#3
Updated by kraih 4 months ago
For some broader context, this document from the Python community explains pretty well why protocol implementations and I/O should be separated. https://sans-io.readthedocs.io/how-to-sans-io.html
#5
Updated by cdywan 2 months ago
- Related to action #76813: [tools] Test using svirt backend fails with auto_review:"Error connecting to VNC server.*: IO::Socket::INET: connect: Connection refused":retry added
#9
Updated by openqa_review 2 months ago
- Due date set to 2022-05-19
Setting due date based on mean cycle time of SUSE QE Tools
#10
Updated by mkittler 2 months ago
First PR merged, second PR: https://github.com/os-autoinst/os-autoinst/pull/2049
#11
Updated by okurz about 2 months ago
merged. https://app.codecov.io/gh/os-autoinst/os-autoinst/blob/master/consoles/VNC.pm shows 87.56%, looking good, looking good :)
#12
Updated by mkittler about 2 months ago
Last PR which should bring it to 100 %: https://github.com/os-autoinst/os-autoinst/pull/2051
(Not considering some other files and the C++ code. But we likely don't need to touch that and it is therefore out of scope.)
Split consoles::VNC into protocol and socket modules so that protocol is separated from networking in os-autoinst consoles::VNC
Note that I didn't follow that suggestion because for the sake of writing unit tests the current approach of mocking is sufficient. Since it is Perl any everything is dynamically typed we can always allow passing a different type of "socket object" instead of a real socket (e.g. some object which will forward stuff via web sockets).
#13
Updated by okurz about 2 months ago
- Due date deleted (
2022-05-19) - Status changed from In Progress to Resolved
Correct approach, I would say :)
https://github.com/os-autoinst/os-autoinst/pull/2051 is merged and provides 100% statement coverage which I think is great and also covers both ACs so let's resolve, shall we?
#14
Updated by mkittler about 2 months ago
AC1 is now fulfilled (https://app.codecov.io/gh/os-autoinst/os-autoinst/blob/master/consoles/VNC.pm is at 100 %) as well as AC2 (unit tests mock the socket).
#15
Updated by AdamWill about 1 month ago
The 'update framebuffer' test added here does not work properly on big-endian (or maybe the test works properly and the code is bad? Either way, there's a problem). https://progress.opensuse.org/issues/111608