Adam01/Cylinder-server

Test errors

Closed this issue · 6 comments

As seen here.

I can't work out where this is from. I've tried installing python-pam from apt-get, python-pam from pypi, pam from pypi, simplepam from pypi.. Nothing.

I'm not sure what this is supposed to be o/

Managed to fix that one eventually. No module named useful now, did you put it in your requirements?

Some of the tests are unable to find their modules. Additionally, your setup/teardowns don't seem right, this test is complaining that a temporary dir already exists, for example.

Adding cylinder-server to the python path should solve the missing modules in tests.

Yeah, that's what I thought, but well.. Let me give you the steps I have set up right now.

  • Clone the repo
  • Script:
pip install -U setuptools nose python-pam --download-cache $HOME/.pip-cache/
pip install -U -r ./requirements_linux.txt --download-cache $HOME/.pip-cache/
  • Script:
{   # Download and install the Bamboo built tools for Python
    mkdir -p tmp
    git clone https://github.com/tumb1er/bamboo-build-tools.git tmp/
    cd tmp && python setup.py install || cd ..
    rm -rf tmp
} || { # Copy the tests over
    mkdir -p /home/adam02/tests
    cp -R tests/* /home/adam02/tests
    chown -R adam02 /home/adam02
    ls /home/adam02/tests
}
  • Script:
chmod a+rwx $PWD

export PATH="$PATH"
export PYTHONPATH="$PYTHONPATH:$PWD/Cylinder-server/"

sudo -Hu adam02 -ns /usr/local/bin/nosetests --with-xunit --with-coverage --cover-xml -v /home/adam02/tests /home/adam02/tests/unit
cat coverage.xml | coverage2clover > clover.xml
  • Test parser

Alright, I think all that's left now is #3

http://bamboo.gserv.me/browse/CYL-SERV-25