The Zero Install system

Dr Thomas Leonard [ contact | GPG public key | blog | donations ]

The Injector: Tests

This page contains various tests for the injector itself.

Unit tests

The injector comes with a suite of unit tests. To run them, install the injector and then type:

$ cd tests
$ ./testall
testDownload (testautopolicy.TestAutoPolicy) ... ok
[...]
testParallel (testtrust.TestTrust) ... ok
----------------------------------------------------------------------
Ran 36 tests in 0.862s

OK

The unit tests do not perform any network access.

Interfaces

This section contains some interfaces which test various features of the injector. Before each test, create a new home directory for the test:

$ export HOME=/tmp/injector-test
$ rm -rf /tmp/injector-test; 0launch -cv URL
http://0install.net/tests/missing
Interface does not exist. You should get a sensible error message.
http://0install.net/tests/newkey
This interface is signed with an unknown key. The key should be downloaded automatically, and you should be prompted to confirm that you trust it.
http://0install.net/tests/badurl
This is a correctly signed interface, but at the wrong URL. The injector should reject it.
http://0install.net/tests/newkey.xml
This interface is not signed. It should be rejected.
http://0install.net/tests/badsig
This interface has been tampered with. It should be rejected.
http://0install.net/tests/multisig
This interface has been signed with multiple keys. You should be prompted to confirm both.
http://0install.net/tests/master
This interface contains no implementations itself, but has two additional feeds. The first is always available (sha1=123), while the second will only be fetched if 'PPC' binaries are supported (sha1=456). (note that the implementations cannot actually be downloaded).
http://0install.net/tests/xmlsig.xml
This interface is signed sightly differently. The signature appears in an XML comment block at the end (meaning that the whole file including the signature is a valid XML document). It should be accepted (requires injector version 0.18 or later).
http://0install.net/tests/Tgif.xml
The archive is in RPM format (so you can install directly from the version on bourbon.usc.edu). It requires injector version 0.18 or later. It will also work on non-RPM systems like Debian.
http://0install.net/tests/pysol.xml
The version downloads a binary in Deb format and then applies a small patch using the recipe element. It requires injector version 0.20 or later. It will also work on non-Debian systems like SuSE.
http://0install.net/tests/Visual-ldd.xml
Running this interface downloads a binary in Autopackage format. It requires injector version 0.21 or later. It does not install or require any autopackage components.
http://0install.net/tests/GNU-Hello.xml
This program just prints "Hello, world!", except that no binary is available for it, only source. Go to the interface properties and click on Compile to compile a binary (or you can run 0compile on the interface directory if you don't want to use the GUI). The source code is downloaded directly from ftp.gnu.org and compiled. Once built and registered, you can run the program again using the URI above to print the greeting.
http://0install.net/tests/Gimp-native.xml
Starting with 0launch 0.28, you can use Zero Install to run programs installed using your distribution's package manager. Running this feed will run /usr/bin/gimp if you are on a Debian-type system and you have the 'gimp' package installed. Although this feed only includes Debian (and Ubuntu, etc) packages, the idea is that a single feed can support packages for multiple distributions, plus Zero Install downloads.