This repository has been archived by the owner on Jul 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I've neglected to include a readme for the testutil. This is the start of one which hopefully explains why testutil exists distinct from other test options and how to use it. Signed-off-by: Tim Pepper <[email protected]>
- Loading branch information
Tim Pepper
committed
Jun 22, 2016
1 parent
a2c16ce
commit 64c508c
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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. |