KIWI acceptance testing based on RSpec
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cfg
root
.gitignore
.rspec
COPYING
GNUmakefile
Gemfile
README.rest
kiwi_spec.rb

README.rest

kiwi_spec

KIWI acceptance testing based on RSpec

kiwi_spec is a remote testing tool for SUSE packages of kiwi. kiwi_spec drives kiwi on another host through ssh(1), and tests the created image using qemu-kvm. This arrangement means kiwi_spec's implementation need not be compatible with the OS version targetted by any specific kiwi package (kiwi_spec is written in ruby, and used to test kiwi packages for all supported SUSE versions, which means a really wide span of ruby(gems) versions.

Installation

git clone https://github.com/openSUSE/kiwi_spec.git
cd kiwi_spec
make bootstrap
for f in cfg/*sample; do cp $f ${f%.sample}; done
# edit files in cfg/
make kiwi_spec

kiwi_spec expects to be run from a machine with bundler >= 1.1 (for the --standalone option); it's been used on various openSUSE versions.

make bootstrap command will install all the required dependencies.

Configuration

A valid authorized_keys file should be placed in root/root/.ssh/authorized_keys.

Then, copy the cfg/*.sample files by removing the .sample suffix, and edit them accordingly. You should have the following files present:

  • cfg/config.xml.template
  • cfg/config.sh
  • cfg/kiwi.yml

Important

If you want to test kiwi on different architectures you can replace relevant part of repository link with #{arch} placeholder in config.xml.template. This way kiwi_spec will detect the server architecture automatically and build final repository link for you. If you want to test the kiwi only on one architecture, keep the links as usual.

Example below provides valid repository layout for SLES 11 SP2:

<repository type="rpm-md">
  <source path="https://nu.novell.com/repo/$RCE/SLES11-SP2-Core/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md">
  <source path="https://nu.novell.com/repo/$RCE/SLES11-SP2-Updates/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md">
  <source path="https://nu.novell.com/repo/$RCE/SLES11-SP1-Pool/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md">
  <source path="https://nu.novell.com/repo/$RCE/SLES11-SP1-Updates/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md" priority="110">
  <source path="https://nu.novell.com/repo/$RCE/SLE11-SDK-SP1-Pool/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md" priority="110">
  <source path="https://nu.novell.com/repo/$RCE/SLE11-SDK-SP1-Updates/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md" priority="110">
  <source path="https://nu.novell.com/repo/$RCE/SLE11-SDK-SP2-Core/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>
<repository type="rpm-md" priority="110">
  <source path="https://nu.novell.com/repo/$RCE/SLE11-SDK-SP2-Updates/sle-11-#{arch}?credentials=NCCcredentials"/>
</repository>

Also notice priority of 110 on SDK repositories. It is important for 11-SP2 appliances.

Operation

make kiwi_spec will run the RSpec tests.