This test uses file.accumulated to accumulate data, to be used in the
file.blockreplace state. However, because this data is stored in a
dictionary, the iteration order is different on different versions of
Python. As it is very clearly stated that the accumulator data structure
is a dictionary, rather than modifying the file.accumulated behavior
this commit just updates the test so that it searches for all values
that it should find between the block markers.
This test is checking behavior that seems to have been specific to the
carbon package from PyPI. Since this is a Python 2-only module, and has
deps that do not exist on Python 3, it should not be run on Python 3.
This PR also removes the warnings that this default with change in
the Nitrogen release, updates the documetation accordingly, and adjusts
some of the affected tests.
Something else is installing pytz (likely via pip), causing filesystem
conflicts when the pkg integration tests try to install python2-pytz as
a dep of python2-django.
This commit also changes a bunch of the other tests so that they are
explicitly skipped instead of just being no-ops in cases where they are
not configured to be run. This provides more accurate information in the
overall test results.
This further abstracts some of the setup and teardown code so it can be
used for git-over-http tests.
It also moves the code that was originally added to the archive
state integration tests to create a local http server into
salt.support.helpers so that it can be more easily and portably used.
This does the following:
- Splits states for container/volume/image/network management into four
separate state modules.
- Preserves backward compatibility by making ``docker.image_present``
invoke ``docker_image.present``, etc.
- Changes how Salt detects that a container needs to be replaced.
Instead of comparing each passed argument to the named container's
configuration, it creates a temporary container, and compares that
container to the named container. If the two differ, then the older
container is removed, and the new one is renamed and started, becoming
the named container.
- Removes the unit tests for container management and replaces them with
integration tests.
- Adds unit tests for the new salt.utils.docker
The tornado web aplication that was set up in the archive tests, and then
duplicated in the remote file integration tests, starts the web server,
but never stops it. This creates a stacktrace that hangs the other test
file that attempts to start the web server.
The Application class has a `listen()` function, but not a `stop()` function.
The change uses the `HTTPServer` class to set up the listening server, but
also has the necessary `stop()` function. (The `listen()` function from the
`Application` class just calls out to the `HTTPServer`'s `listen()` function,
so this works nicely here.)
We can then call the `stop()` function in the `tearDownClass` class method.
I also removed some duplicate STATE_DIR definitions.
Put the skipIf and the destructiveTest decorators on the class instead
of each function. Also added a user.absent to the tearDown to reduce
code duplication.