schtritoff / hyperv-vm-provisioning

Quick provisioning of Linux VM using Hyper-V on Windows
76 stars 28 forks source link

Add Testcases to check code changes also against the older images #25

Open samstagern opened 1 week ago

samstagern commented 1 week ago

A small test suite of Pester tests would be helpful to see if code changes break existing code. I can provide a basic suite of Pester test cases on my Fork. We can use Pester for both integration tests as well as unit tests.

samstagern commented 5 days ago

Test environment setup:

I propose to use:

this means the testing will not work out-of-the box (Pester 3 is installed by default) and requires some minimal setup. As Pester 5 has breaking changes I propose to start with that version instead of the out-of-the-box.

Plink can be used to grab the serial interface output to a file. We can then assert for entries in the boot log. This are easy tests to write. ssh / hvc ssh can be used to test that the ssh server can connect and then be used to ask cloud-image if there were errors.