Functional tests for atomicapp
- [x] Create base test suite
- [x] Create base test suite for Kubernetes
- [x] Create base test suite for Docker
- [x] Create base test suite for Openshift
- [x] Add tests cases for k8s provider
- [x] Add test cases for docker provider
- [x] Add test cases for openshift provider
This looks cool! :dancers: good job so far!
So out of curiosity, we're leaving the openshift/docker/k8s environments up to the user to decide :). Also when running the functional tests I hope that's it per provider instead of a make all type deal.
@rtnpro, we can use the work done by @cdrage at #712 for the functional tests for OpenShift and Kuberentes, instead of parsing the command line output for commands. We can wait till that gets merged, what do you think?
@containscafeine Makes sense! However, if there's a bug in the library, the bug comes in testing as well.
@kadel @surajssd @cdrage @containscafeine
Could you have a look at the PR? The functional tests for kubernetes and docker are working, however gets stuck for the openshift, provider, the mariadb pod comes up fine, but the wordpress pod just gets stuck at ContainerCreating state. Could you guys have a look?
Hmm, I have to look at it closer, but OpenShift fails to start for me :-(
I0818 15:06:04.127099 16652 server.go:2161] http: TLS handshake error from 127.0.0.1:45802: remote error: unknown certificate authority
E0818 15:06:04.537102 16652 fsHandler.go:106] failed to collect filesystem stats - du command failed on /rootfs/var/lib/docker/overlay/bead893d1da467177f3f995376fda514a8f7b1da93f6754a0a05ca989631e2e4 with output stdout: 482300 /rootfs/var/lib/docker/overlay/bead893d1da467177f3f995376fda514a8f7b1da93f6754a0a05ca989631e2e4
, stderr: du: cannot access '/rootfs/var/lib/docker/overlay/bead893d1da467177f3f995376fda514a8f7b1da93f6754a0a05ca989631e2e4/merged/proc/18100/task/18100/fd/4': No such file or directory
du: cannot access '/rootfs/var/lib/docker/overlay/bead893d1da467177f3f995376fda514a8f7b1da93f6754a0a05ca989631e2e4/merged/proc/18100/task/18100/fdinfo/4': No such file or directory
du: cannot access '/rootfs/var/lib/docker/overlay/bead893d1da467177f3f995376fda514a8f7b1da93f6754a0a05ca989631e2e4/merged/proc/18100/fd/3': No such file or directory
du: cannot access '/rootfs/var/lib/docker/overlay/bead893d1da467177f3f995376fda514a8f7b1da93f6754a0a05ca989631e2e4/merged/proc/18100/fdinfo/3': No such file or directory
- exit status 1
k8s and docker OK
@dustymabe @cdrage @kadel
Could you review it?
#dotests
Tests still seem to fail :( @rtnpro
Are we able to add an ignore somehow or putting the functional tests in a different directory for testing?
@cdrage the unittests failed because the test runners are trying to run the functional tests as well.
We need to execute unittests using py.test tests/units
@rtnpro this needs to be fixed then so that travis will only run the non-functional tests, or else every PR is going to fail since it's trying to run the functional tests :)
i'd advise putting the functional tests into a different folder
On Tue, Aug 30, 2016 at 7:21 PM, Charlie Drage [email protected] wrote:
@rtnpro https://github.com/rtnpro this needs to be fixed then so that travis will only run the non-functional tests, or else every PR is going to fail since it's trying to run the functional tests :)
i'd advise putting the functional tests into a different folder
Aye!
Ratnadeep Debnath, https://www.waartaa.com GPG Fingerprint: 033C 8041 A0E9 CDBA 2E02 B785 2119 5486 F245 DFD6
Coverage remained the same at 64.302% when pulling d5984eef4581b32fb5d183dd929891d2dea14f12 on rtnpro:functional-tests into e37911e35b1491488289e93f1b95e3cfeb16c375 on projectatomic:master.
Coverage remained the same at 64.302% when pulling 836125e6356326457fa46c2dc230207c4bf60710 on rtnpro:functional-tests into e37911e35b1491488289e93f1b95e3cfeb16c375 on projectatomic:master.
#dotests
#dotests
Getting this error:
dropbox/dev/atomicapp pr_655 ✔ [116/209]
▶ make functional-test
pip install -qr requirements.txt
pip install -qr test-requirements.txt
/usr/bin/python -m pytest tests/functional/ -vv --cov atomicapp
============================================================================================================================== test session starts ===============================================================================================================================
platform linux2 -- Python 2.7.9, pytest-2.9.2, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python
cachedir: .cache
rootdir: /home/wikus/dropbox/dev/atomicapp, inifile:
plugins: localserver-0.3.5, cov-2.3.1
collected 4 items
tests/functional/test_docker_provider.py::TestWordpress::test_wordpress_run PASSED
tests/functional/test_docker_provider.py::TestWordpress::test_wordpress_stop FAILED
tests/functional/test_kubernetes_provider.py::TestWordpress::test_wordpress_lifecycle ERROR
tests/functional/test_openshift_provider.py::TestWordpress::test_wordpress_lifecycle ERRORCoverage.py warning: No data was collected.
---------- coverage: platform linux2, python 2.7.9-final-0 -----------
Name Stmts Miss Cover
---------------------------------------------------------------------
atomicapp/__init__.py 0 0 100%
atomicapp/applogging.py 80 80 0%
atomicapp/cli/__init__.py 1 1 0%
atomicapp/cli/main.py 204 204 0%
atomicapp/constants.py 45 45 0%
atomicapp/index.py 102 102 0%
atomicapp/nulecule/__init__.py 3 3 0%
atomicapp/nulecule/base.py 234 234 0%
atomicapp/nulecule/container.py 95 95 0%
atomicapp/nulecule/exceptions.py 5 5 0%
atomicapp/nulecule/lib.py 53 53 0%
atomicapp/nulecule/main.py 159 159 0%
atomicapp/plugin.py 72 72 0%
atomicapp/providers/__init__.py 0 0 100%
atomicapp/providers/docker.py 94 94 0%
atomicapp/providers/kubernetes.py 111 111 0%
atomicapp/providers/lib/__init__.py 0 0 100%
atomicapp/providers/lib/kubeshift/__init__.py 0 0 100%
atomicapp/providers/lib/kubeshift/client.py 23 23 0%
atomicapp/providers/lib/kubeshift/exceptions.py 12 12 0%
atomicapp/providers/lib/kubeshift/kubebase.py 158 158 0%
atomicapp/providers/lib/kubeshift/kubeconfig.py 54 54 0%
atomicapp/providers/lib/kubeshift/kubernetes.py 71 71 0%
atomicapp/providers/lib/kubeshift/openshift.py 136 136 0%
atomicapp/providers/marathon.py 67 67 0%
atomicapp/providers/openshift.py 107 107 0%
atomicapp/requirements.py 35 35 0%
atomicapp/utils.py 264 264 0%
---------------------------------------------------------------------
TOTAL 2185 2185 0%
===================================================================================================================================== ERRORS =====================================================================================================================================
____________________________________________________________________________________________________________ ERROR at setup of TestWordpress.test_wordpress_lifecycle ____________________________________________________________________________________________________________
cls = <class 'functional.test_kubernetes_provider.TestWordpress'>
@classmethod
def setUpClass(cls):
> cls.disable_selinux()
tests/functional/base.py:194:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/functional/base.py:88: in disable_selinux
getenforce = subprocess.check_output('getenforce', shell=True).strip()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('getenforce',), kwargs = {'shell': True}, process = <subprocess.Popen object at 0x7f30b236a6d0>, output = '', unused_err = None, retcode = 127, cmd = 'getenforce'
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
If the exit code was non-zero it raises a CalledProcessError. The
CalledProcessError object will have the return code in the returncode
attribute and output in the output attribute.
The arguments are the same as for the Popen constructor. Example:
>>> check_output(["ls", "-l", "/dev/null"])
'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
The stdout argument is not allowed as it is used internally.
To capture standard error in the result, use stderr=STDOUT.
>>> check_output(["/bin/sh", "-c",
... "ls -l non_existent_file ; exit 0"],
... stderr=STDOUT)
'ls: non_existent_file: No such file or directory\n'
"""
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = Popen(stdout=PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd, output=output)
E CalledProcessError: Command 'getenforce' returned non-zero exit status 127
/usr/lib/python2.7/subprocess.py:573: CalledProcessError
----------------------------------------------------------------------------------------------------------------------------- Captured stderr setup ------------------------------------------------------------------------------------------------------------------------------
/bin/sh: 1: getenforce: not found
____________________________________________________________________________________________________________ ERROR at setup of TestWordpress.test_wordpress_lifecycle ____________________________________________________________________________________________________________
cls = <class 'functional.test_openshift_provider.TestWordpress'>
@classmethod
def setUpClass(cls):
> cls.disable_selinux()
tests/functional/base.py:432:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/functional/base.py:88: in disable_selinux
getenforce = subprocess.check_output('getenforce', shell=True).strip()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('getenforce',), kwargs = {'shell': True}, process = <subprocess.Popen object at 0x7f30b23441d0>, output = '', unused_err = None, retcode = 127, cmd = 'getenforce'
def check_output(*popenargs, **kwargs):
r"""Run command with arguments and return its output as a byte string.
If the exit code was non-zero it raises a CalledProcessError. The
CalledProcessError object will have the return code in the returncode
attribute and output in the output attribute.
The arguments are the same as for the Popen constructor. Example:
>>> check_output(["ls", "-l", "/dev/null"])
'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
The stdout argument is not allowed as it is used internally.
To capture standard error in the result, use stderr=STDOUT.
>>> check_output(["/bin/sh", "-c",
... "ls -l non_existent_file ; exit 0"],
... stderr=STDOUT)
'ls: non_existent_file: No such file or directory\n'
"""
if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
process = Popen(stdout=PIPE, *popenargs, **kwargs)
output, unused_err = process.communicate()
retcode = process.poll()
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd, output=output)
E CalledProcessError: Command 'getenforce' returned non-zero exit status 127
/usr/lib/python2.7/subprocess.py:573: CalledProcessError
----------------------------------------------------------------------------------------------------------------------------- Captured stderr setup ------------------------------------------------------------------------------------------------------------------------------
/bin/sh: 1: getenforce: not found
==================================================================================================================================== FAILURES ====================================================================================================================================
_______________________________________________________________________________________________________________________ TestWordpress.test_wordpress_stop ________________________________________________________________________________________________________________________
self = <functional.test_docker_provider.TestWordpress testMethod=test_wordpress_stop>
def test_wordpress_stop(self):
workdir = self._run()
self.undeploy(workdir)
> self.assertContainerNotRunning('wordpress-atomicapp')
tests/functional/test_docker_provider.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <functional.test_docker_provider.TestWordpress testMethod=test_wordpress_stop>, name = 'wordpress-atomicapp'
def assertContainerNotRunning(self, name):
containers = self._get_containers()
for _id, container in containers.items():
> if container['name'] == name:
E KeyError: 'name'
tests/functional/base.py:152: KeyError
------------------------------------------------------------------------------------------------------------------------------ Captured stdout call ------------------------------------------------------------------------------------------------------------------------------
['docker', 'rm', '-f', '474ae8453e10']
['docker', 'rm', '-f', 'b532cc60b88c']
================================================================================================================== 1 failed, 1 passed, 2 error in 32.44 seconds ==================================================================================================================
Makefile:22: recipe for target 'functional-test' failed
make: *** [functional-test] Error 1
I'm assuming this is due to failure in Debian-based OS' ^^. Mind patching in a detection if selinux is installed and/or what OS you're running?
Coverage increased (+0.02%) to 65.202% when pulling d0b57edc95da5863d8a05cfebd9fd5ef582b4fd3 on rtnpro:functional-tests into a7dccffd07de6370d5582fa852854d3a34156d27 on projectatomic:master.
Coverage increased (+0.02%) to 65.202% when pulling 5974a240c4a71b7ba9d1f46614f30e87089af2af on rtnpro:functional-tests into 2c5eecaeb8b7b506c2f330c1d6094d85a224198d on projectatomic:master.
Coverage increased (+0.02%) to 65.202% when pulling 71ef41e0010029487b4725e68a6d43de8cd7bae4 on rtnpro:functional-tests into 2c5eecaeb8b7b506c2f330c1d6094d85a224198d on projectatomic:master.
@cdrage could you review it, once again? I am still not able to make py.test work with TTY enabled with shell=True env variable. The tests are working fine with nose or unittest test runner.
@rtnpro still seems to fail upon running the tests:
Step 10 : ENV PYTHONPATH /opt/atomicapp/
---> Running in 052dbab804c5
---> 6c0d6c855ee2
Removing intermediate container 052dbab804c5
Step 11 : ENTRYPOINT /usr/bin/python /opt/atomicapp/atomicapp/cli/main.py
---> Running in 127a4dd28bc8
---> 88aca8638222
Removing intermediate container 127a4dd28bc8
Step 12 : ADD atomicapp/ /opt/atomicapp/atomicapp/
---> 51d63d1c50a4
Removing intermediate container cb0999590c7a
Successfully built 51d63d1c50a4
/usr/bin/python -m pytest tests/functional/ -vv --cov atomicapp
============================================================================================================================== test session starts ===============================================================================================================================
platform linux2 -- Python 2.7.9, pytest-2.9.2, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python
cachedir: .cache
rootdir: /home/wikus/dropbox/dev/atomicapp, inifile:
plugins: localserver-0.3.5, ordering-0.4, cov-2.3.1
collected 3 items
tests/functional/test_docker_provider.py::TestWordpress::test_wordpress_lifecycle FAILED
tests/functional/test_kubernetes_provider.py::TestWordpress::test_wordpress_lifecycle
endless delay at that point / freezes up.
Also.. weird issue..
For some reason, if I run the functional tests within the atomicapp git repo make functional-test under your PR (branch pr_655) your script will switch atomicapp BACK to master at some point..
Here is the full log running sudo make functional-test
##########
INSTALLING ATOMIC CLI
##########
atomic-1.8/
atomic-1.8/.gitignore
atomic-1.8/Atomic/
atomic-1.8/Atomic/Export.py
atomic-1.8/Atomic/Import.py
atomic-1.8/Atomic/__init__.py
atomic-1.8/Atomic/atomic.py
atomic-1.8/Atomic/diff.py
atomic-1.8/Atomic/mount.py
atomic-1.8/Atomic/pulp.py
atomic-1.8/Atomic/satellite.py
atomic-1.8/Atomic/satellite_new.py.test
atomic-1.8/Atomic/top.py
atomic-1.8/Atomic/util.py
atomic-1.8/Atomic/verify.py
atomic-1.8/CHANGELOG.md
atomic-1.8/COPYING
atomic-1.8/Makefile
atomic-1.8/README.md
atomic-1.8/atomic
atomic-1.8/atomic.sh
atomic-1.8/atomic.sysconfig
atomic-1.8/atomic_client.py
atomic-1.8/atomic_dbus.py
atomic-1.8/atomicdesign.pdf
atomic-1.8/bash/
atomic-1.8/bash/atomic
atomic-1.8/docs/
atomic-1.8/docs/.gitignore
atomic-1.8/docs/atomic-diff.1.md
atomic-1.8/docs/atomic-host.1.md
atomic-1.8/docs/atomic-images.1.md
atomic-1.8/docs/atomic-info.1.md
atomic-1.8/docs/atomic-install.1.md
atomic-1.8/docs/atomic-migrate.1.md
atomic-1.8/docs/atomic-mount.1.md
atomic-1.8/docs/atomic-push.1.md
atomic-1.8/docs/atomic-run.1.md
atomic-1.8/docs/atomic-scan.1.md
atomic-1.8/docs/atomic-stop.1.md
atomic-1.8/docs/atomic-top.1.md
atomic-1.8/docs/atomic-uninstall.1.md
atomic-1.8/docs/atomic-unmount.1.md
atomic-1.8/docs/atomic-update.1.md
atomic-1.8/docs/atomic-verify.1.md
atomic-1.8/docs/atomic-version.1.md
atomic-1.8/docs/atomic.1.md
atomic-1.8/docs/install/
atomic-1.8/docs/install/Debian.md
atomic-1.8/docs/install/Fedora.md
atomic-1.8/gotar
atomic-1.8/migrate.sh
atomic-1.8/org.atomic.conf
atomic-1.8/org.atomic.policy
atomic-1.8/org.atomic.service
atomic-1.8/requirements.txt
atomic-1.8/setup.py
atomic-1.8/test.sh
atomic-1.8/tests/
atomic-1.8/tests/integration/
atomic-1.8/tests/integration/test_diff.sh
atomic-1.8/tests/integration/test_display.sh
atomic-1.8/tests/integration/test_info.sh
atomic-1.8/tests/integration/test_migrate.sh
atomic-1.8/tests/integration/test_mount.sh
atomic-1.8/tests/integration/test_pass.sh
atomic-1.8/tests/integration/test_top.sh
atomic-1.8/tests/integration_template.sh
atomic-1.8/tests/test-images/
atomic-1.8/tests/test-images/Dockerfile.1
atomic-1.8/tests/test-images/Dockerfile.2
atomic-1.8/tests/unit/
atomic-1.8/tests/unit/test_mount.py
atomic-1.8/tests/unit/test_util.py
atomic-1.8/tests/unit_template.py
Reading package lists...
Building dependency tree...
Reading state information...
python-dbus is already the newest version.
git is already the newest version.
go-md2man is already the newest version.
python-selinux is already the newest version.
make is already the newest version.
pylint is already the newest version.
python-pip is already the newest version.
python-rpm is already the newest version.
The following packages were automatically installed and are no longer required:
python-decorator python-slip python-slip-dbus
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 82 not upgraded.
Requirement already satisfied (use --upgrade to upgrade): requests>=2.4.3 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): docker-py in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): websocket-client>=0.11.0 in /usr/local/lib/python2.7/dist-packages/websocket_client-0.37.0-py2.7.egg (from -r requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): six>=1.3.0 in /usr/local/lib/python2.7/dist-packages (from -r requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): ipaddress>=1.0.16; python_version < "3.3" in /usr/local/lib/python2.7/dist-packages (from docker-py->-r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): backports.ssl-match-hostname>=3.5; python_version < "3.5" in /usr/local/lib/python2.7/dist-packages (from docker-py->-r requirements.txt (line 3))
make[1]: Entering directory '/home/wikus/dropbox/dev/atomicapp/atomic-1.8'
/usr/bin/python2 setup.py build
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/Atomic
copying Atomic/verify.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/__init__.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/top.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/mount.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/diff.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/satellite.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/Import.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/atomic.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/util.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/pulp.py -> build/lib.linux-x86_64-2.7/Atomic
copying Atomic/Export.py -> build/lib.linux-x86_64-2.7/Atomic
running build_scripts
creating build/scripts-2.7
copying and adjusting atomic -> build/scripts-2.7
copying and adjusting atomic_dbus.py -> build/scripts-2.7
changing mode of build/scripts-2.7/atomic from 644 to 755
changing mode of build/scripts-2.7/atomic_dbus.py from 644 to 755
/usr/bin/go-md2man -in docs/atomic-diff.1.md -out docs/atomic-diff.1.tmp && touch docs/atomic-diff.1.tmp && mv docs/atomic-diff.1.tmp docs/atomic-diff.1
/usr/bin/go-md2man -in docs/atomic-install.1.md -out docs/atomic-install.1.tmp && touch docs/atomic-install.1.tmp && mv docs/atomic-install.1.tmp docs/atomic-install.1
/usr/bin/go-md2man -in docs/atomic-stop.1.md -out docs/atomic-stop.1.tmp && touch docs/atomic-stop.1.tmp && mv docs/atomic-stop.1.tmp docs/atomic-stop.1
/usr/bin/go-md2man -in docs/atomic-info.1.md -out docs/atomic-info.1.tmp && touch docs/atomic-info.1.tmp && mv docs/atomic-info.1.tmp docs/atomic-info.1
/usr/bin/go-md2man -in docs/atomic-host.1.md -out docs/atomic-host.1.tmp && touch docs/atomic-host.1.tmp && mv docs/atomic-host.1.tmp docs/atomic-host.1
/usr/bin/go-md2man -in docs/atomic-run.1.md -out docs/atomic-run.1.tmp && touch docs/atomic-run.1.tmp && mv docs/atomic-run.1.tmp docs/atomic-run.1
/usr/bin/go-md2man -in docs/atomic-update.1.md -out docs/atomic-update.1.tmp && touch docs/atomic-update.1.tmp && mv docs/atomic-update.1.tmp docs/atomic-update.1
/usr/bin/go-md2man -in docs/atomic.1.md -out docs/atomic.1.tmp && touch docs/atomic.1.tmp && mv docs/atomic.1.tmp docs/atomic.1
/usr/bin/go-md2man -in docs/atomic-images.1.md -out docs/atomic-images.1.tmp && touch docs/atomic-images.1.tmp && mv docs/atomic-images.1.tmp docs/atomic-images.1
/usr/bin/go-md2man -in docs/atomic-unmount.1.md -out docs/atomic-unmount.1.tmp && touch docs/atomic-unmount.1.tmp && mv docs/atomic-unmount.1.tmp docs/atomic-unmount.1
/usr/bin/go-md2man -in docs/atomic-migrate.1.md -out docs/atomic-migrate.1.tmp && touch docs/atomic-migrate.1.tmp && mv docs/atomic-migrate.1.tmp docs/atomic-migrate.1
/usr/bin/go-md2man -in docs/atomic-push.1.md -out docs/atomic-push.1.tmp && touch docs/atomic-push.1.tmp && mv docs/atomic-push.1.tmp docs/atomic-push.1
/usr/bin/go-md2man -in docs/atomic-verify.1.md -out docs/atomic-verify.1.tmp && touch docs/atomic-verify.1.tmp && mv docs/atomic-verify.1.tmp docs/atomic-verify.1
/usr/bin/go-md2man -in docs/atomic-scan.1.md -out docs/atomic-scan.1.tmp && touch docs/atomic-scan.1.tmp && mv docs/atomic-scan.1.tmp docs/atomic-scan.1
/usr/bin/go-md2man -in docs/atomic-mount.1.md -out docs/atomic-mount.1.tmp && touch docs/atomic-mount.1.tmp && mv docs/atomic-mount.1.tmp docs/atomic-mount.1
/usr/bin/go-md2man -in docs/atomic-top.1.md -out docs/atomic-top.1.tmp && touch docs/atomic-top.1.tmp && mv docs/atomic-top.1.tmp docs/atomic-top.1
/usr/bin/go-md2man -in docs/atomic-uninstall.1.md -out docs/atomic-uninstall.1.tmp && touch docs/atomic-uninstall.1.tmp && mv docs/atomic-uninstall.1.tmp docs/atomic-uninstall.1
/usr/bin/go-md2man -in docs/atomic-version.1.md -out docs/atomic-version.1.tmp && touch docs/atomic-version.1.tmp && mv docs/atomic-version.1.tmp docs/atomic-version.1
true -E --additional-builtins=_ *.py atomic Atomic tests/unit/*.py
/usr/bin/python2 setup.py install --install-scripts /usr/share/atomic `test -n "" && echo --root `
running install
running build
running build_py
running build_scripts
running install_lib
creating /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/verify.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/__init__.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/top.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/mount.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/diff.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/satellite.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/Import.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/atomic.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/util.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/pulp.py -> /usr/local/lib/python2.7/dist-packages/Atomic
copying build/lib.linux-x86_64-2.7/Atomic/Export.py -> /usr/local/lib/python2.7/dist-packages/Atomic
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/verify.py to verify.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/__init__.py to __init__.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/top.py to top.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/mount.py to mount.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/diff.py to diff.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/satellite.py to satellite.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/Import.py to Import.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/atomic.py to atomic.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/util.py to util.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/pulp.py to pulp.pyc
byte-compiling /usr/local/lib/python2.7/dist-packages/Atomic/Export.py to Export.pyc
running install_scripts
copying build/scripts-2.7/atomic -> /usr/share/atomic
copying build/scripts-2.7/atomic_dbus.py -> /usr/share/atomic
changing mode of /usr/share/atomic/atomic to 755
changing mode of /usr/share/atomic/atomic_dbus.py to 755
running install_data
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/atomic-1.8.egg-info
install -d -m 0755 /usr/bin
ln -fs ../share/atomic/atomic /usr/bin/atomic
install -d -m 0755 /usr/libexec/atomic
install -m 0755 migrate.sh gotar /usr/libexec/atomic
[ -d /etc/sysconfig ] || mkdir -p /etc/sysconfig
install -m 644 atomic.sysconfig /etc/sysconfig/atomic
[ -d /etc/profile.d ] || mkdir -p /etc/profile.d
install -m 644 atomic.sh /etc/profile.d
install -d /usr/share/man/man1
install -m 644 docs/atomic-stop.1 docs/atomic-images.1 docs/atomic-push.1 docs/atomic-mount.1 docs/atomic-run.1 docs/atomic-diff.1 docs/atomic-update.1 docs/atomic-unmount.1 docs/atomic-migrate.1 docs/atomic.1 docs/atomic-verify.1 docs/atomic-scan.1 docs/atomic-host.1 docs/atomic-install.1 docs/atomic-info.1 docs/atomic-top.1 docs/atomic-uninstall.1 docs/atomic-version.1 /usr/share/man/man1
echo ".so man1/atomic-push.1" > /usr/share/man/man1/atomic-upload.1
make[1]: Leaving directory '/home/wikus/dropbox/dev/atomicapp/atomic-1.8'
./tests/functional/scripts/prepare.sh install
Prepare for Debian
/usr/bin/docker build -t atomicapp:build .
Sending build context to Docker daemon 557.1 kB
Sending build context to Docker daemon 1.08 MB
Step 1 : FROM centos:7
---> 980e0e4c79ec
Step 2 : MAINTAINER Red Hat, Inc. <[email protected]>
---> Using cache
---> 29e850569cea
Step 3 : ENV ATOMICAPPVERSION "0.6.3"
---> Using cache
---> 483813b3dcca
Step 4 : LABEL io.projectatomic.nulecule.atomicappversion ${ATOMICAPPVERSION} io.openshift.generate.job true io.openshift.generate.token.as env:TOKEN_ENV_VAR RUN "docker run -it --rm \${OPT1} --privileged -v \${PWD}:/atomicapp -v /run:/run -v /:/host --net=host --name \${NAME} -e USER -e SUDO_USER -e NAME=\${NAME} -e IMAGE=\${IMAGE} \${IMAGE} \${OPT2} run \${OPT3}" STOP "docker run -it --rm \${OPT1} --privileged -v \${PWD}:/atomicapp -v /run:/run -v /:/host --net=host --name \${NAME} -e USER -e SUDO_USER -e NAME=\${NAME} -e IMAGE=\${IMAGE} \${IMAGE} \${OPT2} stop \${OPT3}"
---> Using cache
---> 1d8cfdeb000b
Step 5 : WORKDIR /opt/atomicapp
---> Using cache
---> 6981ccee1c14
Step 6 : ADD requirements.txt ./
---> Using cache
---> 68ee6813773c
Step 7 : RUN yum install -y epel-release && yum install -y --setopt=tsflags=nodocs docker && yum install -y --setopt=tsflags=nodocs $(sed s/^/python-/ requirements.txt) && yum clean all
---> Using cache
---> 75aa961fc3b2
Step 8 : WORKDIR /atomicapp
---> Using cache
---> 9bfa6e24a1f8
Step 9 : RUN chmod 777 /atomicapp
---> Using cache
---> 83f62d3b52bb
Step 10 : ENV PYTHONPATH /opt/atomicapp/
---> Using cache
---> 6c0d6c855ee2
Step 11 : ENTRYPOINT /usr/bin/python /opt/atomicapp/atomicapp/cli/main.py
---> Using cache
---> 88aca8638222
Step 12 : ADD atomicapp/ /opt/atomicapp/atomicapp/
---> f0d1eebc6057
Removing intermediate container d088f1a29d6e
Successfully built f0d1eebc6057
/usr/bin/python -m pytest tests/functional/ -vv --cov atomicapp
============================= test session starts ==============================
platform linux2 -- Python 2.7.9, pytest-2.9.2, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python
cachedir: .cache
rootdir: /home/wikus/dropbox/dev/atomicapp, inifile:
plugins: localserver-0.3.5, ordering-0.4, cov-2.3.1
collecting ... collected 3 items
tests/functional/test_docker_provider.py::TestWordpress::test_wordpress_lifecycle FAILED
tests/functional/test_kubernetes_provider.py::TestWordpress::test_wordpress_lifecycle ERROR
tests/functional/test_openshift_provider.py::TestWordpress::test_wordpress_lifecycle <- /home/wikus/dropbox/dev/atomicapp/tests/functional/test_openshift_provider.py ERROR
---------- coverage: platform linux2, python 2.7.9-final-0 -----------
Name Stmts Miss Cover
---------------------------------------------------------------------
atomicapp/__init__.py 0 0 100%
atomicapp/applogging.py 80 80 0%
atomicapp/cli/__init__.py 1 1 0%
atomicapp/cli/main.py 204 204 0%
atomicapp/constants.py 46 11 76%
atomicapp/index.py 102 102 0%
atomicapp/nulecule/__init__.py 3 3 0%
atomicapp/nulecule/base.py 235 235 0%
atomicapp/nulecule/config.py 60 60 0%
atomicapp/nulecule/container.py 95 95 0%
atomicapp/nulecule/exceptions.py 5 5 0%
atomicapp/nulecule/lib.py 40 40 0%
atomicapp/nulecule/main.py 149 149 0%
atomicapp/plugin.py 72 72 0%
atomicapp/providers/__init__.py 0 0 100%
atomicapp/providers/docker.py 94 94 0%
atomicapp/providers/kubernetes.py 111 111 0%
atomicapp/providers/lib/__init__.py 0 0 100%
atomicapp/providers/lib/kubeshift/__init__.py 0 0 100%
atomicapp/providers/lib/kubeshift/client.py 23 23 0%
atomicapp/providers/lib/kubeshift/exceptions.py 12 12 0%
atomicapp/providers/lib/kubeshift/kubebase.py 158 158 0%
atomicapp/providers/lib/kubeshift/kubeconfig.py 54 54 0%
atomicapp/providers/lib/kubeshift/kubernetes.py 71 71 0%
atomicapp/providers/lib/kubeshift/openshift.py 136 136 0%
atomicapp/providers/marathon.py 67 67 0%
atomicapp/providers/openshift.py 107 107 0%
atomicapp/requirements.py 35 35 0%
atomicapp/utils.py 269 269 0%
---------------------------------------------------------------------
TOTAL 2229 2194 2%
==================================== ERRORS ====================================
___________ ERROR at setup of TestWordpress.test_wordpress_lifecycle ___________
cls = <class 'functional.test_kubernetes_provider.TestWordpress'>
@classmethod
def setUpClass(cls):
> super(KubernetesProviderTestSuite, cls).setUpClass()
/home/wikus/dropbox/dev/atomicapp/tests/functional/base.py:248:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/wikus/dropbox/dev/atomicapp/tests/functional/base.py:60: in setUpClass
cls.fetch_nulecule_lib()
/home/wikus/dropbox/dev/atomicapp/tests/functional/base.py:137: in fetch_nulecule_lib
'git pull origin master', shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('cd nulecule-library; git checkout master; git pull origin master',)
kwargs = {'shell': True}, retcode = 1
cmd = 'cd nulecule-library; git checkout master; git pull origin master'
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the Popen constructor. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'cd nulecule-library; git checkout master; git pull origin master' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:540: CalledProcessError
---------------------------- Captured stderr setup -----------------------------
/bin/sh: 1: cd: can't cd to nulecule-library
Switched to branch 'master'
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
___________ ERROR at setup of TestWordpress.test_wordpress_lifecycle ___________
cls = <class 'functional.test_openshift_provider.TestWordpress'>
@classmethod
def setUpClass(cls):
> super(OpenshiftProviderTestSuite, cls).setUpClass()
/home/wikus/dropbox/dev/atomicapp/tests/functional/base.py:425:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/home/wikus/dropbox/dev/atomicapp/tests/functional/base.py:60: in setUpClass
cls.fetch_nulecule_lib()
/home/wikus/dropbox/dev/atomicapp/tests/functional/base.py:137: in fetch_nulecule_lib
'git pull origin master', shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('cd nulecule-library; git checkout master; git pull origin master',)
kwargs = {'shell': True}, retcode = 1
cmd = 'cd nulecule-library; git checkout master; git pull origin master'
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the Popen constructor. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'cd nulecule-library; git checkout master; git pull origin master' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:540: CalledProcessError
---------------------------- Captured stderr setup -----------------------------
/bin/sh: 1: cd: can't cd to nulecule-library
Already on 'master'
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
=================================== FAILURES ===================================
____________________ TestWordpress.test_wordpress_lifecycle ____________________
self = <functional.test_docker_provider.TestWordpress testMethod=test_wordpress_lifecycle>
def test_wordpress_lifecycle(self):
app_spec = self.image_name
> workdir = self.deploy(app_spec, self.answers)
tests/functional/test_docker_provider.py:27:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/functional/base.py:102: in deploy
subprocess.check_call(cmd, stdin=False, stderr=False, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('atomic run wordpress-centos7-atomicapp-59a2aea8 -a /home/wikus/dropbox/dev/atomicapp/tests/functional/build/answers.conf --provider=docker --destination=/home/wikus/dropbox/dev/atomicapp/tests/functional/build',)
kwargs = {'shell': True, 'stderr': False, 'stdin': False}, retcode = 1
cmd = 'atomic run wordpress-centos7-atomicapp-59a2aea8 -a /home/wikus/dropbox/dev/atomicapp/tests/functional/build/answers.conf --provider=docker --destination=/home/wikus/dropbox/dev/atomicapp/tests/functional/build'
def check_call(*popenargs, **kwargs):
"""Run command with arguments. Wait for command to complete. If
the exit code was zero then return, otherwise raise
CalledProcessError. The CalledProcessError object will have the
return code in the returncode attribute.
The arguments are the same as for the Popen constructor. Example:
check_call(["ls", "-l"])
"""
retcode = call(*popenargs, **kwargs)
if retcode:
cmd = kwargs.get("args")
if cmd is None:
cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'atomic run wordpress-centos7-atomicapp-59a2aea8 -a /home/wikus/dropbox/dev/atomicapp/tests/functional/build/answers.conf --provider=docker --destination=/home/wikus/dropbox/dev/atomicapp/tests/functional/build' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:540: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
Sending build context to Docker daemon 16.9 kB\r\r\nStep 1 : FROM atomicapp:build\n ---> f0d1eebc6057\nStep 2 : MAINTAINER Christoph G\xf6rn <[email protected]>\n ---> Running in 83aab1594979\n ---> f50ec241d29b\nRemoving intermediate container 83aab1594979\nStep 3 : LABEL io.projectatomic.nulecule.specversion "0.0.2" io.projectatomic.nulecule.providers "kubernetes, openshift, docker" Build "docker build --rm --tag test/wordpress-centos7-atomicapp ."\n ---> Running in fbe0f1f7b187\n ---> 2ba7a82c77b6\nRemoving intermediate container fbe0f1f7b187\nStep 4 : ADD /Nulecule /Dockerfile README.md /application-entity/\n ---> 1714f47d3077\nRemoving intermediate container 2c65d2237f78\nStep 5 : ADD /artifacts /application-entity/artifacts\n ---> 9a72be50c9e9\nRemoving intermediate container c0769fe3d7b4\nSuccessfully built 9a72be50c9e9
---------------------------- Captured stderr setup -----------------------------
Cloning into '/home/wikus/dropbox/dev/atomicapp/tests/functional/nulecule-library'...
----------------------------- Captured stdout call -----------------------------
docker run -it --rm --privileged -v /home/wikus/dropbox/dev/atomicapp:/atomicapp -v /run:/run -v /:/host --net=host --name wordpress-centos7-atomicapp-59a2aea8 -e USER -e SUDO_USER -e NAME=wordpress-centos7-atomicapp-59a2aea8 -e IMAGE=wordpress-centos7-atomicapp-59a2aea8 wordpress-centos7-atomicapp-59a2aea8 run -a /home/wikus/dropbox/dev/atomicapp/tests/functional/build/answers.conf --provider=docker --destination=/home/wikus/dropbox/dev/atomicapp/tests/functional/build
docker run -it --rm --privileged -v /home/wikus/dropbox/dev/atomicapp:/atomicapp -v /run:/run -v /:/host --net=host --name wordpress-centos7-atomicapp-59a2aea8 -e USER -e SUDO_USER -e NAME=wordpress-centos7-atomicapp-59a2aea8 -e IMAGE=wordpress-centos7-atomicapp-59a2aea8 wordpress-centos7-atomicapp-59a2aea8 run -a /home/wikus/dropbox/dev/atomicapp/tests/functional/build/answers.conf --provider=docker --destination=/home/wikus/dropbox/dev/atomicapp/tests/functional/build
====================== 1 failed, 2 error in 11.45 seconds ======================
Makefile:22: recipe for target 'functional-test' failed