Skip to content

Commit

Permalink
Tests: abstracted out URL to Gerrit RPC server.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Hordecki committed Dec 6, 2011
1 parent ce57233 commit 9e43e97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions README
Expand Up @@ -41,6 +41,7 @@ Tests expects the following environment variables to be set:
* GERRIT_PATH - path to a Gerrit installation
* GERRIT_DB - sqlalchemy URL to the Gerrit database
* GERRIT_GIT - URL to the Gerrit git repository
* GERRIT_URL - URL to the Gerrit HTTP server
* GERRIT_USERNAME - a user the suite with interact as

Check that the provided user has all the privileges required to
Expand Down
2 changes: 2 additions & 0 deletions tests/fixtures.py
Expand Up @@ -5,11 +5,13 @@
from gerrit import db, raw

assert os.getenv('GERRIT_GIT')
assert os.getenv('GERRIT_URL')
assert os.getenv('GERRIT_DB')
assert os.getenv('GERRIT_PATH')
assert os.getenv('GERRIT_USERNAME')

TEST_PROJECT = 'python-gerrit-test-project'
GERRIT_URL = os.getenv('GERRIT_URL')
GERRIT_GIT = os.getenv('GERRIT_GIT').rstrip('/') + '/' + TEST_PROJECT
GERRIT_DB = os.getenv('GERRIT_DB')
GERRIT_PATH = os.getenv('GERRIT_PATH')
Expand Down
2 changes: 1 addition & 1 deletion tests/test_gerrit.py
Expand Up @@ -17,7 +17,7 @@ def setup_module():
fixtures.setup()

def gerrit():
return Client('http://localhost:8080')
return Client(fixtures.GERRIT_URL)

def authenticated_gerrit():
client = gerrit()
Expand Down

0 comments on commit 9e43e97

Please sign in to comment.