Revision d4517eeb

b/docs/installation.rst
79 79

  
80 80
    $ sudo apt-get install python-ansicolors
81 81

  
82
Install mock (for developers only)
83
""""""""""""""""""""""""""""""""""
84

  
85
.. code-block:: console
86

  
87
    $ sudo apt-get install python-mock
88

  
89
.. warning:: kamaki.clients unit-tests need python-mock 1.X or better. e.g.,::
90

  
91
    $ sudo apt-get install python-mock=1.0.1
92

  
93
.. hint:: To activate functional tests in kamaki enable the preconfigured
94
    *livetest* command group:
95

  
96
    .. code-block:: console
97

  
98
        $ kamaki config set livetest_cli livetest
99

  
100 82

  
101 83
.. _installing-from-pypi-ref:
102 84

  
......
146 128

  
147 129
    $ pip install ansicolors
148 130

  
149
Install mock (developers only)
150
""""""""""""""""""""""""""""""
151

  
152
The **mock** package is needed for running the prepared unit-tests in the
153
kamaki.clients package. This feature is useful when extending / debugging
154
kamaki functionality and is aimed to kamaki developers and contributors.
155
Therefore, users can enjoy the full kamaki user experience without installing
156
mock.
157

  
158
.. code-block:: console
159

  
160
    $ pip install mock
161

  
162
.. warning:: mock version >= 1.X
163

  
164
.. hint:: To activate functional tests in kamaki. enable the preconfigured
165
    *livetest* command group:
166

  
167
    .. code-block:: console
168

  
169
        $ kamaki config set livetest_cli livetest
170

  
171 131

  
172 132
Mac OS X
173 133
--------
b/docs/man/kamaki.rst
93 93
Hidden command groups
94 94
---------------------
95 95

  
96
livetest
97
    Live tests that check kamaki against running services. To enable:
98
    kamaki config set livetest.cli livetest
99

  
100 96
service
101 97
    Astakos API service commands
102 98

  
b/docs/setup.rst
481 481
Functional tests
482 482
""""""""""""""""
483 483

  
484
Kamaki contains a set of functional tests for *kamaki.clients*, called
485
"livetest". The term "live" means that the tests are performed against an
486
on-line functional cloud deployment. The package is accessible as
487
*kamaki.clients.livetest* .
488

  
489
The livetest commands can be activated by setting the following option in the
490
configuration file::
491

  
492
    [global]
493
    livetest_cli=livetest
494

  
495
or with this kamaki command::
496

  
497
    $ kamaki config set livetest_cli livetest
498

  
499
In most cases, it is enough to have the default cloud configured correctly.
500
Some commands, though, require some extra settings specific to actual contents
501
of the cloud or the example files used in kamaki.
502

  
503
Here is a list of settings needed:
504

  
505
* for all tests::
506
    * livetest.testcloud = <the cloud alias this test will run against>
507

  
508
* for astakos client::
509
    * livetest.astakos_details = <A file with an authentication output>
510
        To create this file, pipeline the output of an authentication command
511
        with the -j option for raw json output
512

  
513
        .. code-block:: console
514

  
515
            $ kamaki user authenticate -j > astakos.details
516

  
517
    * livetest.astakos_name = <The exact "real" name of the testing user>
518
    * livetest.astakos_id = <The valid unique user id of the testing user>
519

  
520
* for image client:
521
    * livetest.image_details = <A file with the image metadata>
522
        To create this file, pipeline the output of an image metadata command
523
        with the -j option for raw json output
524

  
525
        .. code-block:: console
526

  
527
            $ kamaki image info <img id> -j > img.details
528

  
529
    * livetest.image_id = <A valid image id used for testing>
530
    * livetest.image_local_path = <The local path of the testing image>
531

  
532
* for flavors (part of the compute client):
533
    * livetest.flavor_details = <A file with the flavor details>
534
        To create this file, pipeline the output of a flavor info command
535
        with the -j option for raw json output
536

  
537
        .. code-block:: console
538

  
539
            $ kamaki flavor info <flavor id> -j > flavor.details
540

  
541

  
542
After setup, kamaki can run all tests::
543

  
544
    $ kamaki livetest all
545

  
546
a specific test (e.g., pithos scenario)::
547

  
548
    $ kamaki livetest pithos
549

  
550
or a specific method from a service (e.g., create_server @ cyclades)::
551

  
552
    $ kamaki livetest cyclades create_server
553

  
484
Kamaki does not include functional tests in its native code. The synnefo tool
485
snf-burnin can be used instead.
554 486

  
555 487
Unit tests
556 488
""""""""""

Also available in: Unified diff