top
(README.md)
Ciao Testutil
=============

A given ciao component will have unit tests which cover its internals in a
component specific way.  But this is limited in scope and cannot cover all
of the component's functionality, because that functionality is ultimately
about creating and servicing SSNTP command/event/error/status flows.

To enable testing of those SSNTP flows, the testutil package provides
a set of common test tools for ciao.  Included are:

* shared payload constants
* shared test certificates
* test agent implementation for ssntp.AGENT and ssntp.NETAGENT roles
* test controller implementation for ssntp.Controller role
* test server implementation for ssntp.SERVER role
* example client-server test spanning the above SSNTP actors
* channels for tracking command/event/error/status flows across the SSNTP
  test actors

This allows a ciao component to be tested more meaninfully, but in partial
isolation.  The ciao component under test would be a real implementation,
but its SSNTP peers are the shared synthetic implementations from the
testutil package.

For an example of how to enable basic SSNTP test flows
and track the results through the channel helpers
review the internals of the [example client-server
test](https://github.com/01org/ciao/blob/master/testutil/client_server_test.go).

Additional test options
=======================

Virtual
-------

The next level of test breadth comes from actually running
a test cluster with real implementations of each ciao
component.  This is provided in a controlled fashion via the
[singlevm](https://github.com/01org/ciao/tree/master/testutil/singlevm)
CI script, which has detailed documentation
on the wiki at [Single VM Development
Environment](https://github.com/01org/ciao/wiki/HOWTO:-Single-VM-Development-Environment).

Physical
--------

Testing is of course also possible on a real hardware cluster which has
been set up according to the [cluster setup
guide](https://clearlinux.org/documentation/ciao-cluster-setup.html).
A minimal Build Acceptance Test (BAT) framework outputting TAP
(Test Anything Protocol) results is published [in our release
tools](https://github.com/01org/ciao/tree/master/_release/bat).
The python script drives ciao-cli to query and manipulate the state of
a cluster.

Imported by 2 package(s)

  1. github.com/01org/ciao/ciao-controller
  2. github.com/pdxjohnny/ciao/ciao-controller

Imported only in test by 14 package(s)

  1. github.com/01org/ciao/ciao-launcher
  2. github.com/01org/ciao/ciao-scheduler
  3. github.com/01org/ciao/openstack/identity
  4. github.com/01org/ciao/payloads
  5. github.com/01org/ciao/qemu
  6. github.com/01org/ciao/ssntp
  7. github.com/pdxjohnny/ciao/ciao-launcher
  8. github.com/pdxjohnny/ciao/ciao-scheduler
  9. github.com/pdxjohnny/ciao/openstack/identity
  10. github.com/pdxjohnny/ciao/payloads
  11. github.com/pdxjohnny/ciao/qemu
  12. github.com/pdxjohnny/ciao/ssntp
  13. github.com/pdxjohnny/ciao/testutil
  14. github.com/purpleidea/ciao/payloads

Imports 5 package(s)

  1. github.com/gorilla/mux
  2. github.com/rackspace/gophercloud
  3. github.com/01org/ciao/ssntp
  4. github.com/01org/ciao/payloads
  5. gopkg.in/yaml.v2

Test imports 1 package(s)

  1. github.com/01org/ciao/ssntp/uuid