dockertest.dockercmd: Print stdin when provided

It's hard to know, what happened while executing a command, when you
don't know the provided stdin. This patch appends `<<< "..."` after the
docker execute message in case it's non-zero. I used "%r" to make it
easier to discover, that it's not part of the executed command plus to
decrease size of the log.

Example:
Execute /usr/bin/docker -D run --name test_rvSj fedora bash  <<< 'ls /\nexit\n'
Execute /usr/bin/docker -D run --name test_rvSj fedora ls /

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
dockertest: Fix reaction to missing subsubtests variable in config.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
dockertest: fix docker daemon to works properly for systemd.

try to stop service.socket to be sure that service will not start.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
docker_daemon: Adds restart tests.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
docker_daemon: Adds documentation for restart tests.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
Merge pull request #255 from jzupka/daemon-restart

Daemon restart
subtests.docker_cli.kill: Reflect changes in uncatchable signals

Uncatchable signals are now documented in `man docker run`.
Change `go_lang_bad_signals` test to check man pages and verify that
these signals are not handled (in case golang starts working again)

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge pull request #368 from ldoktor/kill

subtests.docker_cli.kill: Reflect changes in uncatchable signals
Merge pull request #305 from ldoktor/stdin

dockertest.dockercmd: Print stdin when provided
subtests.docker_cli.tag: Bugfixes and style cleanup

* --force was impossible to set due to config automatic translation
* exit_code in FAIL branch was incorrectly controlled
* use NoFailDockerCmd and DockerCmd instead of AsyncDockerCmd
* add docstrings
* change bad names and other PEP8/pylint changes

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
subtests.docker_cli.tag: Add double_tag variants

This test tries to tag the same image multiple times:
* without --force: Expected failure
* with --force: Expected pass

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
dockertest: Changes missing image message to be more new user friendly.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
subtests.docker_cli.dockerinspect: Check CamelCase

This patch adds the CamelCase keys check into the
docker_cli/dockerinspect/inspect_all test.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Merge pull request #378 from jzupka/fix_missing_img

dockertest: Changes missing image message to be more new user friendly.
dockertest.environment: Add support for INI config parser

this parser automatically gathers info from INI files about the subtest
configuration and prints it into the subtest documentation.

It requires #: prefix to store the value as description of following
configuration option.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
config_defaults: Use **string** to emphasize action required

Use **text** to emphasize description of variables, which need to be
changed before using the test.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Add independent documentation module

*  Avoid playing games with docutils module w/in environment module.
   Make dedicated module for documentation rendering.
*  Break down classes further into a more managable tree w/ defined
   extension points.
*  Update all docstrings, add many more comments.
*  Update unittests
*  Updated Makefile to use new module + classes
*  Updated run_checkdocs.py to use new module + classes

Signed-off-by: Chris Evich <cevich@redhat.com>
Docs: Strip config. section from all docstrings

*  Some empty-section removal
*  Some re-numbering of steps

Signed-off-by: Chris Evich <cevich@redhat.com>
dockertest.documentation: Integrate INI parser

*  Class and static method name changed, but interface
   and behavior same.  Update ConfigINIParser.__init__() to use
   SubtestDoc.module_filenames(root_path).
*  Removed unnecessary support for nested keys and hiding
   certain types of format-parsing errors.  Added unittests
   to verify some DocBase class methods & behavior.
*  Pull in default config. section docs by way of prefixing
   subtest list with documentation substitution key.

Signed-off-by: Chris Evich <cevich@redhat.com>
Docs: Re-implement NoOverwriteDict as namedtuple

Provides similar benefits and instances will be
immutable.  Allows access to keys as if they were
attributes, generates it's own documentation.

The class-generator produces two methods with
private-names, though generated docs suggest
they are intended for subclass use.  Effectivly
renamed them with public names (``fields`` and
``asdict``)

Signed-off-by: Chris Evich <cevich@redhat.com>