#107: writing a python test (modeled similarly to install.py) -------------------+-------------------------------------------------------- Reporter: liam | Owner: Type: task | Status: new Priority: major | Milestone: Component: tests | Version: 1.0 Keywords: | -------------------+-------------------------------------------------------- write a python test (modeled similarly to install.py) that takes as input:
* a URL to a kickstart file (URL can be local (e.g. file://) or remote (e.g. http://, ftp://, nfs:// ...) ... but start with easy case first.
* a URL for the install media (again, keep this simple for now and assume file:///var/lib/libvirt/images/Fedora-12-x86_64-DVD.iso)
* a URL to a configuration file that describes the environment - again, perhaps optional for now. But eventually we'll need something that tells the test to create a guest with 4 NICs vs 1 NIC, 3 SCSI drives etc... Don't worry about being fancy at first ... just take the defaults. This is just where I might see it headed in 6+ months. Copy from the kvm autotest project if you like.
At beginning, we focus on the basics and something that gets things far enough along so we can review, adjust and repeat.
#107: writing a python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Changes (by jlaska):
* milestone: => Automate installation test plan
#107: writing a python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
The first version of this script was completed, please see at:
http://git.fedorahosted.org/git/autoqa.git?p=autoqa.git;a=blob;f=tests/anaco...
#107: writing a python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
jlaska mentioned that:
If we can automate the DVD install using a mechanism similar to that used by the existing install.py test, it might make our lives easier in the long run. What makes this scalable is if we have a small number of custom install scripts, but a large number of kickstart files to describe the tests. If we break down the needs of each install test ... do they all have similar needs? From what I can tell, each install test needs to ...
* Prepare the host environment * Define a guest environment (# and type of disks, #nics etc...) * Validate the install images * Specify a kickstart file to direct the install * Detect install progress (and timeout if needed) * Validate installed system meets kickstart criteria * Cleanup the guest environment * What other needs do install tests have?
#107: writing a python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
I added these functions to this script:
1. support DVD boot, with virt-install --cdrom to create VM 2. support local kickstart and remote kickstart file(http,ftp,etc...) 3. user environment checking to run this script 4. some requisite software package check before running 5. use dogtail to pass args to kernel 6. create an additional hard disk to upload and store kickstart file
more details please see source code:
http://git.fedorahosted.org/git/autoqa.git?p=autoqa.git;a=blob;f=tests/anaco...
#107: DVD install python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: liam Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Changes (by kparal):
* owner: => liam * summary: writing a python test (modeled similarly to install.py) => DVD install python test (modeled similarly to install.py)
#107: DVD install python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: liam Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
Jlaska had these changes to test: * Uses existing tests where possible (as defined in rats_install/install.py) * Uses+improves on existing helper methods (as defined in install.py) * Uses the virtguest object and helper methods * Uses existing install monitoring technique (minimon) * Easier to understand test output, this includes logfiles produced by the test (test results, log files default to /tmp/autoqa) * No globals
#107: DVD install python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: liam Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
Jlaska said that things that still need improving from a test perspective ... * Improved definition of what tests must occur for a successful DVD or CD test (for example ... need to add a test confirming that the install source and package repository from the media were used) * Improved support for graphical installs, it works when commenting out some code, but it needs to be integrated * Support for additional kickstart delivery methods (ks=http and ks=nfs) * A more standard method for test output (this isn't specific to your test, but something where jskladan's work with beakerlib might help) * We don't yet test whether the installed system boots.
#107: DVD install python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: liam Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
jlaska said that improvements from a test development perspective ... * Some hard-coded elements need improving * Minimon.py moved into a libary, and minimon the script moved elsewhere * Requires networking to allow for monitoring using minimon - I can live with this for now * Shared/duplicate methods between dvd_install.py and install.py will need to be moved into a library (wwoods can help here) * There is still a lot of work before this becomes something anyone can take and build an install test from ... my goal * Address pylint output
#107: Auto install python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: liam Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Changes (by liam):
* summary: DVD install python test (modeled similarly to install.py) => Auto install python test (modeled similarly to install.py)
#107: Auto install python test (modeled similarly to install.py) --------------------+------------------------------------------------------- Reporter: liam | Owner: liam Type: task | Status: new Priority: major | Milestone: Automate installation test plan Component: tests | Version: 1.0 Resolution: | Keywords: --------------------+------------------------------------------------------- Comment (by liam):
This is the final discussion for auto install tests:
https://fedoraproject.org/wiki/Is_anaconda_broken_roadmap
the concrete install python tests,like dvd_install.py, cd_install.py, mediakit_sanity.py, please see other tickets.
autoqa-devel@lists.fedorahosted.org