Skip to content

Commit

Permalink
Fixes Travis from Lazy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Bouterse committed Dec 14, 2018
1 parent f17c801 commit 3220c3f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .travis/before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,4 @@ sudo mkdir /etc/pulp/
sudo chown -R travis:travis /var/lib/pulp
sudo chown travis:travis /var/cache/pulp

sudo cp ../pulp/.travis/server.yaml /etc/pulp/server.yaml

echo "SECRET_KEY: \"$(cat /dev/urandom | tr -dc 'a-z0-9!@#$%^&*(\-_=+)' | head -c 50)\"" | sudo tee -a /etc/pulp/server.yaml
echo "SECRET_KEY: \"$(cat /dev/urandom | tr -dc 'a-z0-9!@#$%^&*(\-_=+)' | head -c 50)\"" | sudo tee -a /etc/pulp/settings.py
6 changes: 5 additions & 1 deletion .travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ flake8 --config flake8.cfg || exit 1

# Run migrations.
export DJANGO_SETTINGS_MODULE=pulpcore.app.settings
export PULP_CONTENT_HOST=localhost:8080
pulp-manager migrate auth --noinput
pulp-manager makemigrations pulp_app --noinput
pulp-manager makemigrations pulp_file
Expand All @@ -21,12 +22,15 @@ pulp-manager migrate --noinput
# Run functional tests.
pulp-manager reset-admin-password --password admin
pulp-manager runserver >> ~/django_runserver.log 2>&1 &
gunicorn pulpcore.content:server --bind 'localhost:8080' --worker-class 'aiohttp.GunicornWebWorker' -w 2 >> ~/content_app.log 2>&1 &
rq worker -n 'resource_manager@%h' -w 'pulpcore.tasking.worker.PulpWorker' >> ~/resource_manager.log 2>&1 &
rq worker -n 'reserved_resource_worker_1@%h' -w 'pulpcore.tasking.worker.PulpWorker' >> ~/reserved_worker-1.log 2>&1 &
sleep 5
sleep 8

show_logs_and_return_non_zero() {
readonly local rc="$?"
cat ~/django_runserver.log
cat ~/content_app.log
cat ~/resource_manager.log
cat ~/reserved_worker-1.log
return "${rc}"
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Run Services
.. code-block:: bash
pulp-manager runserver
gunicorn pulpcore.content:server --bind 'localhost:8080' --worker-class 'aiohttp.GunicornWebWorker' -w 2
sudo systemctl restart pulp_resource_manager
sudo systemctl restart pulp_worker@1
sudo systemctl restart pulp_worker@2
Expand Down

0 comments on commit 3220c3f

Please sign in to comment.