diff options
author | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-24 21:15:22 +0100 |
---|---|---|
committer | Gauvain Pocentek <gauvain.pocentek@objectif-libre.com> | 2016-01-24 21:15:22 +0100 |
commit | e5438c6440a2477c796427bc598b2b31b10dc762 (patch) | |
tree | d0a4388e15073a65feb41f497ff8b160c3f23f17 /tools | |
parent | c11bebd83dd0ef89645e1eefce2aa107dd79180a (diff) | |
download | gitlab-e5438c6440a2477c796427bc598b2b31b10dc762.tar.gz |
Implement project variables support
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/functional_tests.sh | 2 | ||||
-rwxr-xr-x | tools/py_functional_tests.sh | 2 | ||||
-rw-r--r-- | tools/python_test.py | 9 |
3 files changed, 11 insertions, 2 deletions
diff --git a/tools/functional_tests.sh b/tools/functional_tests.sh index 18770e9..6cb868d 100755 --- a/tools/functional_tests.sh +++ b/tools/functional_tests.sh @@ -41,7 +41,7 @@ pip install -rrequirements.txt pip install -e . # NOTE(gpocentek): the first call might fail without a little delay -sleep 5 +sleep 20 set -e diff --git a/tools/py_functional_tests.sh b/tools/py_functional_tests.sh index a30230b..f37aaea 100755 --- a/tools/py_functional_tests.sh +++ b/tools/py_functional_tests.sh @@ -34,6 +34,6 @@ $VENV_CMD $VENV pip install -rrequirements.txt pip install -e . -sleep 10 +sleep 20 python $(dirname $0)/python_test.py diff --git a/tools/python_test.py b/tools/python_test.py index 820dca1..ff4aa2a 100644 --- a/tools/python_test.py +++ b/tools/python_test.py @@ -158,3 +158,12 @@ tr1 = admin_project.triggers.create({}) assert(len(admin_project.triggers.list()) == 1) tr1 = admin_project.triggers.get(tr1.token) tr1.delete() + +# variables +v1 = admin_project.variables.create({'key': 'key1', 'value': 'value1'}) +assert(len(admin_project.variables.list()) == 1) +v1.value = 'new_value1' +v1.save() +v1 = admin_project.variables.get(v1.key) +assert(v1.value == 'new_value1') +v1.delete() |