Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockertest 0.7.1 (API Changes) #88

Merged
merged 42 commits into from
May 2, 2014
Merged

Conversation

cevich
Copy link
Member

@cevich cevich commented Apr 21, 2014

No description provided.

cevich and others added 19 commits May 2, 2014 17:52
Docstring lists this as being skipped by default
but ``get_size`` formerly was ``True``.  This
makes retrieving the list of containers extremely
slow.  This changes the setting to match the
docstring.

Signed-off-by: Chris Evich <cevich@redhat.com>
*  Previously, it was hard coded to parse the table
   header and data via str.splitlines().  However,
   this does not allow easy subclass extension.

*  Split init string parsing into two overrideable
   methods, ``parseheader()`` and ``parserows()``.
   These may be overridden by subclasses to
   control basic-level interpretation of
   the ``table`` string parameter to ``__init__()``.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
This patch gets rid of standard autotest logging and uses the python
logging functions instead (as it's usual in autotest tests itself!).

Each line is prepended with 2 tabs in order to improve readability of
the text. Additionally duplicite messages were removed and the SubSubtest
log lines updated. Each SubSubtest line starts with additional 2 spaces.
Using another \t seemed waist of lines as each SubSubtest is introduced
with RUNNING: message.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
This patch makes possible to set the verbose flag for underlying utils.run

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
*  Current tabular output parsers separate columns
   based on number of whitespace.  This fails
   if any table content contains multiple spaces.

*  Replace whitespace-sensitive parser with generic
   parser based on column name spacing, from
   output module.

*  DockerContainer.ports defined as always being a string
   but default param allows it to be set to None.  Fix
   this inside __init__ so it's assigned an empty string
   if a None parameter is received.

*  Several methods were calling ``get_container_list()``
   and assuming it was always a python-list.  However
   it's long-since been documented as "implementation-specific".
   Fix them to call self.list_containers() instead.

Signed-off-by: Chris Evich <cevich@redhat.com>
Apperently not all modules have __name__ attribute...

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Both ``remove_after_test`` and ``try_remove_after_test``
are now included in ``defaults.ini`` though marked
as deprecated.

Signed-off-by: Chris Evich <cevich@redhat.com>
Enabling tests via ``--args`` on autotest command line
or running all tests is default.  No convenient way
to disable a test from inside dockertest.  The new
``disabled`` option, accepts subtest or subsubtest
CSV to bypass.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Jiří Župka <jzupka@redhat.com>
There is no ``__setattr__()`` to pass-through to the interface class,
so any attribute setting will only affect ``DockerImages`` instance.
This is not normally what is desired.  Add a ``__setattr__()``
method and fixup local attribute access to permit callers to
interact with interface instance as intended.

Signed-off-by: Chris Evich <cevich@redhat.com>
A string is iterable, but a string is not a list.

Signed-off-by: Chris Evich <cevich@redhat.com>
*  Consolidate log message formatting code.

*  Allow failif method w/o reason

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Some tests expect a DockerCommandError to be thrown
and will not accept a regular CmdError.  However,
this general behavior is wrong anyway because
callers should not be dependent on implementation-
specific exceptions.  Add a temporary band-aid
so DockerImagesCLI raises the expected exception.
Add a bunch of FIXME's to address the real problem
with some well-defined exception classes for common
conditions.

Signed-off-by: Chris Evich <cevich@redhat.com>
If an image has no name, removal will fail.
Try again by id and throw exception if that fails.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
cevich added 23 commits May 2, 2014 17:52
Signed-off-by: Chris Evich <cevich@redhat.com>
*  Documentation renders by default with class
   init. params. in headline.  Since special
   methods are also generally hidden, it reads
   better if all init param docs are put in
   class-level docstring.

*  Commitments have been made to continuing this project
   officially, so removed warning message from beginning
   of docs and index.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
Signed-off-by: James Molet <jmolet@redhat.com>
Signed-off-by: James Molet <jmolet@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
*  Fully deprecated OutputGoodBase.output_good and
   updated unittests.

*  Fully deprecated SubSubtest.make_repo_name()

*  Officially declared environment.AllGoodBase.__init__
   as abstract.

*  Removed unnecessary TODO comment

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Also added __init__ and private methods
to the exclusion list for documentation

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
*  Replace DockerContainersCLICheck class with clic.verify_output = True

*  Add debugging messages around gathered data

*  Fix improper usage of get_container_list() with
   call to list_containers() as intended.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
This method returns implementation-specific values,
it should rarely (if ever) be called by any test code.
The only reason it's there is as a standardized extension
point for implementations to use.

Signed-off-by: Chris Evich <cevich@redhat.com>
*  rerun_long_term_app did not properly specify
   to skip the error-message check - since an error
   message is expected.

*  Base class postprocess() was not generalized enough
   in the OutputGood check for all tests.

Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
@cevich
Copy link
Member Author

cevich commented May 2, 2014

Okay, it's not perfect, there's still a TON of subtest cleanup/maintenance that needs to happen but can wait until the next minor version.

cevich added a commit that referenced this pull request May 2, 2014
Dockertest 0.7.1 (API Changes)
@cevich cevich merged commit eaaacf6 into autotest:master May 2, 2014
@cevich cevich deleted the docker_0.7.1 branch September 5, 2014 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants