Revision d4517eeb docs/setup.rst

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