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

Validate Homu TOML file #420

Merged
merged 1 commit into from Jul 11, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added test to check if homu.conf is valid TOML

  • Loading branch information
Crimack committed Jul 7, 2016
commit 5e284fa40df648116b44e8b8b6250440d332b777
@@ -52,6 +52,6 @@ else
# Only run tests against the new configuration
# TODO: don't hard-code this
if [ "${SALT_NODE_ID}" = "servo-master1" ]; then
./test.py sls.buildbot.master sls.nginx
./test.py sls.buildbot.master sls.homu sls.nginx
fi
fi
@@ -15,7 +15,9 @@ homu:
- pkg: python3
- pip: virtualenv
pip.installed:
- name: git+https://github.com/servo/homu@{{ homu.rev }}
- pkgs:
- git+https://github.com/servo/homu@{{ homu.rev }}
- toml == 0.9.1 # Please ensure this is in sync with requirements.txt
- bin_env: /home/servo/homu/_venv
- require:
- virtualenv: homu
@@ -1,3 +1,4 @@
# Python modules needed for testing
# (Travis-CI will auto-install them from this file)
flake8 == 2.5.4
toml == 0.9.1 # Please ensure this is in sync with homu/init.sls
No changes.
@@ -0,0 +1,11 @@
import toml

from tests.util import Failure, Success


def run():
try:
toml.load('/home/servo/homu/cfg.toml')
except Exception as e:
return Failure('Homu config file is not valid TOML:', str(e))
return Success('Homu config file is valid TOML')
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.